Refactor out HTMLFormField class and type normalisation code

Also include fieldname when exceptioning over bad descriptor class

Change-Id: Ia612453625fdeb611875d5ffc724cef2abe4f776