Increased minimum PHP version from 5.2 to 5.3
New autoloading type system, added to pkg editor

Completely changing the way types are provided. They are now completely
based off a PHP interface which defines all the necessary API endpoints
required by THT.

The autoloading system is powered by PHP namespaces, which map directly
to directories.
Eg: TheHostingTool\Types\Post2Host -> includes/types/post2host.php
The autoloading is defined in the compiler.

The type system defines the Type interface. This must be implemented
by all classes in the types directory. THT will purposefully fail
otherwise.

- getName() returns a human readable string of the type
name.

- getInternalName() must return a unique name that will id the
type. To ensure everything works correctly keep it to lowercase
alphanumeric characters and make certain it begins with a letter.
This will be eventually checked and enforced at runtime.

- cron() returns void (read: nothing) and is run on every cron job.
The type is responsible for figuring out what it needs to do and when.

- getPkgFields() needs to return an array of fields to use in the pkg
editor. If no fields are needed return false not an empty array.

The format for the fields array is like the following:

array(
  array("id" => "fieldId", "name" => "fieldLabel", "type" => "htmlType"),
  array("id" => "anotherId", "name" => "someName", "type" => "select",
  "options" => array(
    "optionid" => "option label", "anotherOp" => "another option"
  ), "default" => "anotherOp")
);

Right now only HTML text and similar types are supported. This includes
"number" and others. Select is also supported as demonstrated by the
second field. More input types will be added later. Notably checkbox. To
see a real example of these fields in action check the Post2Host
implementation. The default param is available for all types, not just
select. The default will be used only if no value is already set by
the user. I tried to make these map as closely to HTML properties as
possible. Since getPkgFields() is not static you can change the
presented fields at runtime.

- validatePkgFields(&$data) is provided an array with the fields
from the package editor. So if you had a field with id "posts" then
$data will have a key of "posts" and the value will be from the form.
Return false or an error string if the validation fails. Return true
if everything is acceptable. Return true also if you have no validation
to do. The Post2Host class has another functioning example. $data is
passed by reference so you may alter the incoming data in addition to
just checking it.

A few other methods will be defined later that will allow you to
further customize the control panel as you could with the old type
system. You'll notice there's no field system for the order field yet.
Naturally this is very untested and relatively fragile but definitely
cleaner over the previous messy system.

The new system requires that all types be rewritten. This will make
me finally clean up the paid code and have it function completely
from within a type class.

To demonstrate the power of the new type interface basic support has
been added to the package editor. This includes the ability to display
and use the pkgFields and pass the corresponding data to the validate
method. Data is stored in the packages table within the additional
field as a JSON object. Here's an example of JSON that you might
find in the additional field.

{
  "types": {
    "p2h": {
      "signup": "123",
      "monthly": "321",
      "forum": "anthrfrm"
    },
    "free": []
  }
}

Note the internal type ids are used. The package manager is nearing
completion. More work is required on the field system. And error
handling needs to be improved. A few bugs with type handling will be
patched in future commits. A lot more could be written on how
the type system is being handled on the client/JS side.

A future update to THT will bring the conventions set forth in the new
type system to other parts of the script, like server classes.
Fixed SQL error when adding new packages
Type field data now appears when adding a new pkg

This is only a temporary solution because the validation process can
manipulate the data before it's actually saved to the database.