fix bugs in sqlite adapter

The sqlite adapter was building wrong sql statements because it didn't consider all possible cases.These Bugs have been fixed.
What case is this change supposed to fix? Existing unit test SQLiteAdapterTest::testChangeColumn fails for me (on 0.3.x-dev) with this change.