apps: keep list of switches in ordered in cloud_server.c

We want the hrefs of collection elements to take the
form of {collection_href}/{item_index}. To keep track of
the next possible index value after insertion/deletions
it best to keep the list in order and at each insertion
look for the next free index value.
4 jobs for feature/add-collection-to-cloud-server in 3 minutes and 24 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #4526
Android_build

00:03:02

passed #4527
doxygen

00:00:57

passed #4524
Linux_Secured_Test

00:03:24

passed #4525
Linux_Unsecured_Test

00:02:59