forms: fixup a few sanity issues

  * Require a label on form fields
  * Require variable name to be unique per form
  * Fixup duplicate phone numbers on upgrade
Prefer last message date to reopened date for default sort order

- Tickets will recent replies from the user floats to the top.
- Priority still tops the effective
Merge pull request #158 from greezybacon/issue/form-sanity

Fixup a few sanity issues on custom forms

Peter Rotich <peter@osticket.com>
Restore %{message} replacement on ticket notice
Add better description to the upgrader

Fix duplicate phone number (again)
Use GREATEST to get the most recent activity date
Change recent activity date as opposed to create date on ticket view
Fix attachment mishap in outgoing emails

The detection of inline images in the mail processor causes inline images to
be removed from the attachment list, if listed there. However, the
attachments in the attachment list were not keyed by the attachment-id, so
there was no proper way to detect and remove the attachments from the list.

This patch properly keys the attachment list by the attachment file_id
Merge pull request #175 from greezybacon/issue/159

Fix attachment mishap in outgoing emails

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #162 from greezybacon/issue/upgrader-fixes-again

Add better description to the upgraded

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #161 from protich/feature/sortorder

Ticket view sort order.

Reviewed-By: Jared Hancock <jared@osticket.com>
Update tickets.md