Implemented creation of empty index if needed.

Modified code to check if the index exists and create a new empty index
if it doesn't. This way synchronization works even if auto-index-creation
is turned off and also the ES index is created even in case there are
no packages in NPM registry (yet).
test: added test for creation of an empty index
Land: Create index if needed