all: add tests.

You are right and ideally all these functions should be private (LastVersion, CreateTables, CollectMigrations etc), because users are not supposed to use them. But then I can't use these functions too until I move them to the /cmd/pg_migrate package. Probably this is good idea. I need think about it more.