Issue#668 Blank STI type blows up search with Postgres

Use combination of COALESCE and NULLIF to ensure that table rows with
blank string for type are cast to parent class
Updating pg development dependency to something recent.
Renaming convert_nulls_or_blank to just convert_blank.

Matches Rails' idea of blank.