test: implement static funcions and catch blocks

Allow the php source analyzer scan for $this in static functions as well as
properly handle the exception variable inside catch blocks.
email: Handle poorly encoded email headers

Handle cases where email headers contain unicode or high-ascii characters
and are not encoded according to RFC-2047. This patch handles a special case
where a detectable unicode character set is used, such as UTF-8. For
high-ascii characters in a character set other than iso-8859-1, the result
of this patch is undefined.

Fixes #826
install: Fix incomplete settings on install
Merge pull request #186 from greezybacon/issue/default-timezone

install: Fix incomplete settings on install

Reviewed-By: Peter Rotich <peter@osticket.com>
Properly handle htmlchars in web-based posts
email: drop <!DOCTYPE ...> strings from email body
Properly encode htmlchars in thread bodies

And avoid double encoding email bodies if html thread is not enabled
Merge pull request #187 from greezybacon/issue/drop-doctype

email: drop <!DOCTYPE ...> strings from email body

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #188 from greezybacon/issue/double-encode-email-htmlchars

Properly encode htmlchars in thread bodies

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #850 from greezybacon/issue/826

email: Handle poorly encoded email headers

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #851 from greezybacon/issue/htmlchars

Properly handle htmlchars in web-based posts

Reviewed-By: Peter Rotich <peter@osticket.com>
api: Add example script to create tickets
upgrade: Fix phone number scrambled on upgrade
upgrade: Avoid creating unnecessary index

There's a unique index on %user_email.address, so there's no need to create
an index on %ticket.email when matching up records.
forms: Unless specified, limitless input in long answers

Fixes #191
Merge pull request #190 from greezybacon/hotfix/phone-number-scramble

upgrade: Fix phone number scrambled on upgrade

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #194 from greezybacon/issue/191

forms: Unless specified, limitless input in long answers

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #852 from greezybacon/feature/api-example-script

api: Add example script to create tickets

Reviewed-By: Peter Rotich <peter@osticket.com>
email: Accept inline body with disposition params

A mail client may indicate a header parameter (such as Novell Groupwise,
which may add something like

Content-Disposition: inline; modification-time: "Thu ..."

) Previously, the system would not consider the content to be a candidate
for the email body, because it has parameters to the content-disposition
header.

This patch will still consider the part to be a candidate for the body if
the mime types match and no filename is found in the content-disposition
parameters.
Merge pull request #853 from greezybacon/issue/inline-body-with-disposition-params

email: Accept inline body with disposition params

Reviewed-By: Peter Rotich <peter@osticket.com>