Avoid unicode LookupError

`six.text_type` is `unicode` on Python 2 and `str` on Python 3. Both of these
functions accept multiple parameters: the second is the `encoding` parameter.
According to the documentation: "The encoding parameter is a string giving the
name of an encoding; if the encoding is not known, `LookupError` is raised."
Because `LookupError` does not inherit from `TypeError`, it is not caught by
the try/catch blocks, and can result in Flask-Restful returning a 400 status
code response.

This commit changes the default type to a wrapper around `six.text_type` that
only takes one parameter. This way, an encoding will never be specified, and it
will never raise a `LookupError`.
Adjust factory method to follow Flask extension guidelines

Based on 85cdf6bbb968debfa622ccb819ee9849b5a94e88 and
21c4ca7968c5da2c8d9fdb7f13774ec50fe062a5, authored by Matt Wright
<matt@nobien.net> @mattupstate