Fix html issues and add update function

Previously HTML was invalid when re-opening the template as the entries from mysqli_real_escape_string() were not reverted.

- Modified so that the templates are stored/saved in the same format as Sendy uses for campaigns.
- Fixed update functionality which previously resulted in a 404.

If upgrading from v1.0.0, you'll have to change your table structure from blob to medium text for 'content'.