Fix adapter state when InitiallyPowered=false and RememberPowered=false

This patch reintroduces the adapter->initialized flag since it's
actually needed to make sure we only apply the InitiallyPowered setting
for the very first time when initializing an adapter.
diff --git a/src/adapter.c b/src/adapter.c
index bfc2b8b..ee30aed 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -134,6 +134,7 @@
 
 	struct hci_dev dev;		/* hci info */
 	gboolean pairable;		/* pairable state */
+	gboolean initialized;
 
 	gboolean off_requested;		/* DEVDOWN ioctl was called */
 
@@ -2263,9 +2264,14 @@
 	}
 
 	if (on_mode) {
-		if (main_opts.remember_powered == FALSE)
-			*on_mode = main_opts.mode;
-		else if (read_on_mode(address, str, sizeof(str)) < 0)
+		if (main_opts.remember_powered == FALSE) {
+			if (adapter->initialized)
+				*on_mode = get_mode(&adapter->bdaddr, "on");
+			else {
+				*on_mode = main_opts.mode;
+				adapter->initialized = TRUE;
+			}
+		} else if (read_on_mode(address, str, sizeof(str)) < 0)
 			*on_mode = main_opts.mode;
 		else
 			*on_mode = get_mode(&adapter->bdaddr, str);