IIRC, the general idea of the changes I gave should work.
What doesn't is the code to do the "install".
Maybe you can try:
<?php
$settingsForm = new Settings_Form(Settings_Form::FILE_ADAPTER);
$settingsVals = $settingsForm->getConfigValues();
$settingsVals['db_type'] = 'MySQLm';
$settingsForm->setConfigValues($settingsVals);
$settingsForm->save();
And if that doesn't work, maybe @live627 can suggest how to use the new settings class to save the new db-type to Settings.php...