internal database package refactor: use composite pattern for managing commands
removed unused assignments and imports
CD matrix now updated, if present, when Map pixel size is changed.
Better pattern for checking for key existence in dictionaries
Merge pull request #1187 from ayshih/resample

CD matrix now updated, if present, when Map pixel size is changed.
Merge pull request #1151 from derdon/pyflakes

removed unused assignments and imports
Merge pull request #1150 from derdon/dbcmds-refactor

internal database package refactor
merge conflict removed again