apps/btshell: Add 'silent' option to scan commands

This adds option to silent the discovery results. This is useful in case
there is another callback listener registered that handles the scan
results, and the user does not want the default handler to print the
results.
diff --git a/apps/btshell/src/btshell.h b/apps/btshell/src/btshell.h
index c74ca2f..c457fd7 100644
--- a/apps/btshell/src/btshell.h
+++ b/apps/btshell/src/btshell.h
@@ -92,6 +92,7 @@
     uint16_t limit;
     uint8_t ignore_legacy : 1;
     uint8_t periodic_only : 1;
+    uint8_t silent : 1;
     uint8_t name_filter_len;
     char name_filter[NAME_FILTER_LEN_MAX];
 };
diff --git a/apps/btshell/src/cmd.c b/apps/btshell/src/cmd.c
index 1924e4f..4c00d7b 100644
--- a/apps/btshell/src/cmd.c
+++ b/apps/btshell/src/cmd.c
@@ -1110,6 +1110,7 @@
     .limit = UINT16_MAX,
     .ignore_legacy = 0,
     .periodic_only = 0,
+    .silent = 0,
     .name_filter_len = 0,
 };
 
@@ -1136,6 +1137,12 @@
         return rc;
     }
 
+    g_scan_opts.silent = parse_arg_bool_dflt("silent", 0, &rc);
+    if (rc != 0) {
+        console_printf("invalid 'silent' parameter\n");
+        return rc;
+    }
+
     g_scan_opts.periodic_only = parse_arg_bool_dflt("periodic_only", 0, &rc);
     if (rc != 0) {
         console_printf("invalid 'periodic_only' parameter\n");
@@ -1160,6 +1167,7 @@
     {"decode_limit", "usage: =[0-UINT16_MAX], default: UINT16_MAX"},
     {"ignore_legacy", "usage: =[0-1], default: 0"},
     {"periodic_only", "usage: =[0-1], default: 0"},
+    {"silent", "usage: =[0-1], default: 0"},
     {"name_filter", "usage: =name, default: {none}"},
     {NULL, NULL}
 };
diff --git a/apps/btshell/src/main.c b/apps/btshell/src/main.c
index 0f87b5c..6424bf6 100644
--- a/apps/btshell/src/main.c
+++ b/apps/btshell/src/main.c
@@ -1315,11 +1315,23 @@
 
         return btshell_restart_adv(event);
 #if MYNEWT_VAL(BLE_EXT_ADV)
-    case BLE_GAP_EVENT_EXT_DISC:
-        btshell_decode_event_type(&event->ext_disc, arg);
+    case BLE_GAP_EVENT_EXT_DISC: {
+        struct btshell_scan_opts *scan_opts = arg;
+
+        if (!scan_opts->silent) {
+            btshell_decode_event_type(&event->ext_disc, arg);
+        }
+
         return 0;
+    }
 #endif
-    case BLE_GAP_EVENT_DISC:
+    case BLE_GAP_EVENT_DISC: {
+        struct btshell_scan_opts *scan_opts = arg;
+
+        if (scan_opts->silent) {
+            return 0;
+        }
+
         console_printf("received advertisement; event_type=%d rssi=%d "
                        "addr_type=%d addr=", event->disc.event_type,
                        event->disc.rssi, event->disc.addr.type);
@@ -1337,6 +1349,7 @@
         btshell_decode_adv_data(event->disc.data, event->disc.length_data, arg);
 
         return 0;
+    }
 
     case BLE_GAP_EVENT_CONN_UPDATE:
         console_printf("connection updated; status=%d ",