This commit adds tracking of the index to the metastore so that data
nodes will ignore replayed indexes when they are restarted. This
does not include index persistence for the shards.
* Pull database, Measurement, Series, ReplicationPolicy, and Shard into database.go to keep things manageable and clean
* Remove the locks from the index method. The server will handle thread safety for database objects
* Move the Index tests into database_test.go and in the influxdb package because we're not exporting database
* Updated megastore to build the per database index for the server object
* Changed Server to have MeasurementNames and MeasurementSeriesIDs methods instead of generic Measurement method.