Added "app" framework in app.lua.
Created new src/ directory structure.

The code is now organised into:

  src/core - the "kernel" of snabbswitch
  src/lib  - libraries for apps to use
  src/apps - individual apps
core/timer.lua: Simple timer implementation.
designs/spammer: New "appliance design" for a packet spammer.
app.lua: Removed a line of dead code in Source:pull().
Makefile: Avoid trying to compile Emacs auto-save files.

Specifically: don't pick up filenames containing #.
Added core.main.exit() to quit w/ normal shutdown.

Currently prints profiler information if appropriate.
app.report() now only prints link traffic.

doesn't call report() on each app.
Merge branch 'designs'
First cut at basic Graphviz output of the 'app' network.

New function app.graphviz() generates a 'dot' file as a string. Each
app is a node, each link is an edge, and edges are labeled with
transmit counts.

app.selftest() writes this to ./app-selftest.dot.
intel_app.lua: Preallocate buffers.

This causes a surprising performance improvement.
Conditionalize assertions in receive/transmit on new debug flag.

Inhibiting these checks increases performance about 7% on app.selftest().
app/link_ring: Working nreadable() and nwritable() link methods.
packet.h: Change refcount and fuel from uint32_t to int32_t.

This has a major performance impact on packet.ref() and packet.deref().
packet.lua: Added 'debug' flag to inhibit add_iovec assertions.

The default is false. The assertions have a modest but measurable
impact on performance.
link_ring.h: Made LINK_RING_SIZE a power of two (8129, was 10001).

This makes it faster to check for link full.
link_ring.lua: Make 'size' (C.LINK_RING_SIZE) variable 'local'.

This has a huge impact on performance.
app.selftest(): Preallocate buffers.

This has a big performance impact.
app.Source/Sink/etc: Minor optimization.

Calculate how many packets can be processed, then do so with a
counting for loop. This is modestly faster than a while loop checking
for link full/empty (the original behavior).

For example, this old code:

    while not empty(i) and not full(o) do
       transfer(o, receive(i))
    end

becomes:

    for _ = 1, math.min(nreadable(i), nwritable(o)) do
       transfer(o, receive(i))
    end
Upgraded to LuaJIT 2.1-alpha (from LuaJIT 2.0.2).

Now using the new LuaJIT statistical profiler (new -jp argument)
instead of tprof (removed -p argument).

Example usage:
  snabbswitch -jp=3F