Add charmstore commands.

Copy files from core.
Fix import paths, remove core dependencies and improve tests.