Refactoring to reduce the number of simple pointers

Unnecessary pointers are a bit of a pain to work with - the
QExplicitlySharedDataPointer method is nicer. This changes most
instances of Event * to Event and makes Event an assignable data type.
More depointerization

Processes are now passed around as values, not pointers, since they are
essentially pointers already, thanks to Qt's shared data API. Also
changes many collection pointers to straight collections where sensible
(e.g. QList * to QList).
Backend class for processes added.

PBase and its subclasses represent the different types of processes and
their internal structure. Currently they only lack the hash function and
display text methods.
Improves foreign functions and pretty printing.

Foreign functions are now less verbose, using the bind operator >>=
where appropriate to reduce clutter while retaining clarity. Helper
functions input, output and outputArray tidy up some of the routine
tasks in foreign functions.

cpex_process_string now uses the monadic pretty printer in order to
allow for more succinct output.

Makes use of process hashing in Haskell rather than trying to do
something recursive in C++.
Removes unnecessary IORefs from foreign haskell interface
Adds colour to the process listing.

Processes in the tree are given colours to matching brackets to improve
readability, using a custom delegate to render the item view. Six
cycling colours are available.
Changes root process to be visible in the tree view.