Fix setting of mode after discovery times out.

When discovery times out, we were not setting the mode appropriately.
Thus, if the adapter is turned off and on, we will get the incorrect mode.
Also add a forward declaration for the introduced circular dependency.
diff --git a/src/adapter.c b/src/adapter.c
index e3b293a..0a5a48a 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -152,6 +152,8 @@
 
 static void adapter_set_pairable_timeout(struct btd_adapter *adapter,
 					guint interval);
+static DBusMessage *set_discoverable(DBusConnection *conn, DBusMessage *msg,
+				gboolean discoverable, void *data);
 
 static int found_device_cmp(const struct remote_dev_info *d1,
 			const struct remote_dev_info *d2)
@@ -390,7 +392,7 @@
 
 	adapter->discov_timeout_id = 0;
 
-	adapter_ops->set_discoverable(adapter->dev_id, FALSE);
+	set_discoverable(NULL, NULL, FALSE, user_data);
 
 	return FALSE;
 }