minor fixes to the init scripts
imgstorage: move some static function to module level

I need some of this functions in other classes and they where
already static.
commands: first take at clean storagemap

This command will be used to clean the nodes (both nas and vm)
from leftover when some command fails.

With this patch the command can clean up only vm nodes
Next commit will be to cleanup NAS
commands: now it cleans the NAS