Rewrite datastores.

* Support passing configuration to datastores.
* Support more then one datastore per machine category.

Change-Id: I86680eba265d1986aabdc648c931678e24f45adf