Refactor model functions.

* have model functions use insert!, update! and delete! instead of generic
  execute!
* use the JDBC SQL DSL library for queries