Dispatch model class instantiation based on stored doc_type

This function enables the fetching of archived / deleted forms, according to the appropriate subclass. This is generally useful, but specifically to support serving archived forms through the API.