Move migration-y things to arm, start sql refactor

Query, Insert, Update and Delete need to be refactored from the qbs
criteria thing to the ar Queryable thing, or at least some of them.
QuerySql moved to just Query, and it got migrated somewhat. Next will
probably an UpdateBy from UpdateSql and DeleteBy from DeleteSql while
mappers will get a Delete and Save function that takes the place of the
other functions of InsertSql, UpdateSql and DeleteSql.