Fixed pg typecast issue.
Fixed unit specs to work with pg_typecast.
Refactor of Store#find regarding escaping/substitution. Passes integration tests.
Revert "Refactor of Store#find..." for now, because it obscures final SQL and makes testing harder.

This reverts commit 31a325d5101238df1f31db86bcb500ef7ea155fa.