Restructure source tree and tidy up CMakeLists.txt

 * Move code for injected library into lib/ subdir
 * Use CMAKE_AUTOMOC
 * Adapt the library name depending on the platform

The inspector does not currently work on current Mac systems
because gdb is no longer available
Add simpler injector which uses shared library preloading

This adds a simpler injector which uses DYLD_INSERT_LIBRARIES (Mac)
or LD_PRELOAD (Linux) to inject the hook lib.

This works on current Mac systems where gdb no longer exists but
should also be more reliable even on systems where gdb
is available.
Specify the full path to the inspector's socket

This fixes a potential issue where the injector and the inspector
would try to use different socket paths depending on their current
working dirs.
Fix corruption of object names transmitted from target to inspector

Use the correct UTF-8 encoding that Protocol buffers expects
for string fields.
Add 'Refresh Object' action to refresh the property list for the current object
Support regular expression patterns in the property list filter
Propagate environment from parent process to child

This is required on Linux in order for the child to inherit
the DISPLAY var amongst others.

Also check for the existence of the socket file rather than
the log file, which is created earlier in the hooking process
by the child.
Correct prepending of injector lib path to preload env var

The dynamic loader on OS X does not like empty elements
in the list
Skip empty entries when prepending to library preload list