Umbrella commit switching to delayed reference counting (still
experimental work in progress).

This is a larger overhaul of HILTI's runtime memory management. Rather
than generally keeping all reference counts up to date all the time
(which involves a lot of pretty much uncessary operations), we now
enforce correct reference counts only during explicit "safepoints". In
between safepoints, HILTI is free to skip counting. For now, we
trigger safepoints upon entry/exit into HILTI (either from/to C, or
from/to the thread scheduler), which means that we can generally omit
all reference counting operations for objects that don't persist
across these boundaries, including for everything on the stack.

Internally this is achieved by maintaining "nullbuffers" that record
objects that need to have their reference counts checked for being
zero at the next safepoint; and by adding extra code to adjust all
live variables when safepoints may trigger. (Currently, that's still a
bit inefficient, but should work well once we can leverage LLVM's
stackmaps in the future).

With this change comes a bit more baked in:

    - Calling conventations have changed to return values at +0
    (instead of +1). With the delayed reference counting, even freshly
    created heap objects can be returned without increased reference
    counts (but are put into the nullbuffer immediately). An attribute
    &ref can be used for HILTI-C function that do want to return at
    +1.

    - Handling of attributes have been unified inside the HILTI
    compiler. Also moving regexp's attributes from type information to
    the values.

    - Heap values can now be "hoisted" to the stack if they don't need
    to persist longer that the stack's lifetime. That avoids having to
    allocate them dynamically. Currently that's triggered with a
    &hoist attribute and works for bytes only; however there's no
    correctness checks in place and must be used only if it satisfies
    all the constraints. Eventually HILTI will learn to identify the
    right situations and apply &hoist itself as suitable.

    - hilti-build now disables debugging when optimizions turned on.
    Tests turn on debugging by default now.

    - Starting to port HILTI to LLVM 3.5-to-be (current master).

This is all still experimental (but passes the test-suite).
Starting to add infrastructure to parse LLVM's stackmaps.

The code isn't complete yet, and what's there works only on Linux.
Also, clang 3.5-to-be still seems to have some problems and produces
crashes in JIT and backend code generation (as of current git).

To reproduce the code generation problem:

    hilti-build  -o a.out tools/pac-driver/pac-driver.cc binpac/unit/switch.pac2
Merge branch 'master' into topic/robin/refcnt

Not working yet.
Merge branch 'master' into topic/robin/refcnt
Fix to avoid triggering crash in LLVM 3.5.
Fix for mktime DST confusion.
Fix reference counting bugs.
Fixing set_input() with &length fields.
Updating test baselines.
Removing debugging output.
Fix for embedding objects in pac-driver input in incremental mode.
Fixing &first_match attribute for regexps.
Fixing substring extraction in presense of embedded objects.
Two HILTI instructions to set marks in bytes objects.

    bytes.append_mark <b>
        Appends an internal mark at the end of the bytes object <b>.
        The mark is fully transparent to other instructions, and will
        keep its location when more data is appended to the object.

    bytes.next_mark <i>
        Move the bytes iterator i forward to the next mark.
Fixup for HILTI's mark instructions.
Support for resynchronizing at marks.

type test2 = unit {
       %synchronize-at = mark;
       [...]
}

Pac-driver gets an option -m to insert marks into input stream
(primarily for testing).
Adding unions to HILTI. WIP.
Two HILTI instructions to set marks in bytes objects.

    bytes.append_mark <b>
        Appends an internal mark at the end of the bytes object <b>.
        The mark is fully transparent to other instructions, and will
        keep its location when more data is appended to the object.

    bytes.next_mark <i>
        Move the bytes iterator i forward to the next mark.
Support for resynchronizing at marks.

type test2 = unit {
       %synchronize-at = mark;
       [...]
}

Pac-driver gets an option -m to insert marks into input stream
(primarily for testing).
CMake tweaks for Bro plugin.

Don't hardcode depenendet system libraries, use hilti-config instead.