Add common utility functions

The process of fetching a distantly related field type (for the purpose
of verifying its existence/validity or for actually getting the type
itself) was repeated in a few places in the project code.
Streamline for use of resolve_orm_path()
Fix bug with ascii encoding

Strings are decoded to utf-8 before being cast to unicode.  Special
characters (such as the copyright or rights-reserved symbols) should
pass through without causing string decoding errors.
Reduce list of field tests

isinstance() checks subclass types, allowing for simpler, more readable
if-else branches.  CharField and TextField are base classes of all
other fields that also support the "__icontains" query type.
Housekeeping

Fix trailing whitespace.