Fix md5 hash on windows platforms

The installer compares the md5 of the on-disk sql install file with the
signature file shipped alongside. If the signatures do not match, it will
refuse to install osTicket. On Windows(TM) platforms, PHP will automatically
translate newlines to Windows newlines (CRLF), which will corrupt the MD5
hash of the file.

This patch opens the file in binary mode explicitly to prevent the automatic
conversion.
Fixup argument parsing with no args (store_true)
Use internal stdout and stderr objects for logging

Inside cli modules, use internal stdout and stderr objects rather than
writing directly to the PHP outputs. This will allow for significantly
easier regression testing integration.
Fixup Unpacker::unpackage()

- Force destination folder to always have a trailing slash
- Log if verbosity is set to stdout
- Use MD5 to see if copy is necessary
Add deploy cli script

This will allow folks following the git development model to checkout the
sourcecode to one folder, follow an upstream git brach, and deploy the
osticket installation from a current branch to a location somewhere.

The deploy process differs from the unpack process in that it does not
assume to be inside an 'upload/' folder from the install zipball, and it
does not deploy the 'setup/' folder.

The include folder is still supported to be installed elsewhere.
Rebase test suite to be more modular
Simple mockup for publish/subscribe signal model
Add a check (predicate) callable to the signal connect

This allows another signal condition to the connection, so that, in addition
to the (sub) class, another check can be made before the signal is delivered
to the connected callable
Merge pull request #577 from greezybacon/feature/signals

Implement a simple signal (event) architecture

Reviewed-With: Peter Rotich <peter@osticket.com>
Remove trailing line in MySQLi file
Add test to find leading and trailing whitespace
Merge pull request #583 from greezybacon/issue/579

Fix printing / attachment download issues

Reviewed-With: Peter Rotich <peter@osticket.com>
Merge pull request #570 from greezybacon/issue/win32-install

Install may fail on Windows platforms

Reviewed-By: Peter Rotich <peter@osticket.com>
Deploy dot files as well
Merge pull request #586 from greezybacon/feature/deploy-cli

Add deploy cli script

Reviewed-By: Peter Rotich <peter@osticket.com>
Make the Unpacker arguments extensible

Turns out that the $args passed into the run() method of the Unpacker are
not correctly utilized and so, it is not correctly extensible
Prefer session persistent configuration over database

This will allow setting something in the session and having that value
override the value from the database. If ->persist() is called for a given
key, a following ->get() will result in the session persisted value being
returned. ->set() will still save the value in the database.

This is mostly useful for last-mile scenarios (and future plugins) that need
to affect the configuration of the system without altering the data in the
configuration table.
Merge pull request #587 from greezybacon/issue/extensible-unpack

Make the Unpacker arguments extensible
Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #590 from greezybacon/feature/config-prefer-persist

Prefer session persistent configuration over database

Reviewed-By: Peter Rotich <peter@osticket.com>