Start of refactoring cloud functionality into a plugin.
Renamed modules to fit move of Cloud module to plugins.
Added cloud plugin.
Fixed bug in has_states and implemented the default plugin mechanism.