Fix possible serious errors in dynamic form fields

Fix dropping of materialized view when variable name is changed

Ensure view exists before merging updates

Prevent possible sql injection error in field name used in the materialized
view.

Prevent possible xss error in the display of the field label and variable
name in the admin panel.
Merge pull request #388 from greezybacon/issue/mat-view-bugs

Fix possible serious errors in dynamic form fields

Reviewed-By: Peter Rotich <peter@osticket.com>