set app-version in setupDatabase() only if database is empty;
use namespace-app-version as base to calculate a namespace's version
extract app-version setup into separate method
typo
Merge pull request #1420 from alexispeter/app-version-setup-fix

fix app-version update in CM_App::setupDatabase()