Add a Lua plugin sandbox

This is a work in progress since it has to be manually built with
a patched Lua.  Also, the sandbox does not include support for
protocol buffer messages yet.
Add read_message functionality to the lua sandbox
Add unit tests for all field types
Correct Severity and Pid return
Work in progress

- shutdown the decoder runners when the tcp connection is closed
- remove the chain from the pipeline and configuration
- update the output runner
- create a filter runner
- update the filter interface
- remove the router per input and just use a single global router.  Since the
filter list will soon be read/write it will require serial access anyway.
No performance impact is expected since the router is simply handing off work
to other go routines.

trink@trink-x230:/work/git/heka-build$ cat bin/agent.conf
{
	"inputs": [
		{"name": "tcp:5565",
		 "type": "TcpInput",
		 "address": "127.0.0.1:5565"
		}
	],
	"decoders": [
        {"type": "JsonDecoder", "encoding_name": "JSON"},
        {"type": "ProtobufDecoder", "encoding_name": "PROTOCOL_BUFFER"}

	],
	"outputs": [
		{"name": "debug", "type": "LogOutput"}
	],
   "filters": {
       "lua_sandbox" :
       {
        "type": "SandboxFilter",
        "message_filter": "Type == \"hekabench\" && EnvVersion == \"0.8\"",
   	"output_timer" : 1,
   	"outputs" : ["debug"],
           "sandbox": {
               "type" : "lua",
               "filename" : "src/github.com/mozilla-services/heka/sandbox/lua/testsupport/sandbox.lua",
               "memory_limit" : 32767,
               "instruction_limit" : 1000
           }
       },
       "counter" :
       {
	        "type": "CounterFilter",
           "message_filter": "Type == \"hekabench\" && EnvVersion == \"0.8\"",
   	"output_timer" : 1,
   	"outputs" : ["debug"]
       }
   }
}

trink@trink-x230:/work/git/heka-build$ bin/hekad -config=bin/agent.conf -maxprocs=4
2013/03/04 14:52:34 Starting hekad...
2013/03/04 14:52:34 Output started: debug
2013/03/04 14:52:34 Filter started: counter
2013/03/04 14:52:34 Filter started: lua_sandbox
2013/03/04 14:52:34 Input started: MessageGeneratorInput
2013/03/04 14:52:34 Input started: tcp:5565
2013/03/04 14:52:34 MessageRouter started
2013/03/04 14:53:18 Got 112879 messages. 112078.24 msg/sec
2013/03/04 14:53:18 timer event count=112386
2013/03/04 14:53:19 timer event count=218994
2013/03/04 14:53:19 Got 331342 messages. 219807.68 msg/sec
2013/03/04 14:53:20 Got 557530 messages. 226429.49 msg/sec
2013/03/04 14:53:20 timer event count=226143
2013/03/04 14:53:21 Got 780155 messages. 222625.69 msg/sec
2013/03/04 14:53:21 timer event count=222645
2013/03/04 14:53:22 timer event count=220625
2013/03/04 14:53:22 Got 1000954 messages. 220395.23 msg/sec
2013/03/04 14:53:23 Got 1227993 messages. 227204.34 msg/sec
2013/03/04 14:53:23 timer event count=227194
2013/03/04 14:53:24 Got 1453041 messages. 225101.04 msg/sec
2013/03/04 14:53:24 timer event count=225076
2013/03/04 14:53:25 Got 1679010 messages. 226141.14 msg/sec
2013/03/04 14:53:25 timer event count=226040
2013/03/04 14:53:26 Got 1903346 messages. 222030.91 msg/sec
2013/03/04 14:53:26 timer event count=224239
2013/03/04 14:53:27 Got 2119930 messages. 218878.95 msg/sec
2013/03/04 14:53:27 timer event count=216550
2013/03/04 14:53:28 Got 2341221 messages. 221289.93 msg/sec
2013/03/04 14:53:28 timer event count=221362
2013/03/04 14:53:29 Got 2561810 messages. 220591.31 msg/sec
2013/03/04 14:53:29 timer event count=220055
2013/03/04 14:53:30 Got 2783085 messages. 221228.33 msg/sec
2013/03/04 14:53:30 timer event count=221729
2013/03/04 14:53:31 Got 3002062 messages. 219022.32 msg/sec
2013/03/04 14:53:31 timer event count=219029
2013/03/04 14:53:32 Got 3143201 messages. 141125.94 msg/sec
2013/03/04 14:53:32 timer event count=141134
Merge branch 'dev' into features/lua-sandbox
Clean up the sandbox for integration with heka-build
Merge branch 'features/lua-sandbox' into dev

Conflicts:
	pipeline/outputs.go
	pipeline/pipeline_runner.go