Allow non-interactive database upgrades to rt-setup-database

This patch allows repeatable, scriptable upgrades for testing upgrading.
It adds two switches to rt-setup-database:

--upgrade-from - Specify the version to start applying upgrade content
--upgrade-to   - Specify the version to stop applying upgrade content
Merge branch '4.0/non-interactive-upgrade' into 4.0-trunk