Moved gorp setup into a helper function to avoid duplication and allow management db gorp handle to be set manually via a new SetManagementDB function for unit testing.
Moved gorp setup into a helper function to avoid duplication and allow management db gorp handle to be set manually via a new SetManagementDB function for unit testing.

freneticmonkey/migrate,freneticmonkey/migrate