Fix compiling on FreeBSD.  Resolves issue #112.
Support for IPv6 servers

When a host resolves to an IPv6 address, net.Dial to "addr:port" fails
with "too many colons in address" as the address needs to be enclosed in
square brackets. Use net.JoinHostPort to join them correctly.

Additionally, support square brackets (although not strictly necessary)
in the host specification.
Check stat error on config file and correctly return a non-nil err if anything fails
Add a couple of notes about line number counter and some possibly unused logic
Make reconnect time (1s) adjustable in config, and fix 0s reconnect when read error during ack
Fix broken registrar persistence, multiple prospector tracking issues, and (re?)implement configurable dead_time
Bugfix for logging lines without or delayed newlines

I found a solution for the issue
https://github.com/elasticsearch/logstash-forwarder/issues/149
Merge branch 'master' into driskell (gofmt etc)
Fix issue #144 - only obey from-beginning for new files during startup, while running always start beginning (match LogStash behaviour) - also store the start offset straight away in statefile to ensure it persists through restart even if file does not change
Fixing some more issues (offset calculation, removing CR,...)

Fixed: file offset still calculated wrong. File was detected as
truncated again :-(
Fixed: loosing the beginning of a partial line
Fixed: A CR is also removed from the EOL

Known issues:
If the last line was logged with CRLF as EOF then the file offset is
not correct calculated (missing one byte for the CR) in the Registry
Fix stud version requirement and test spec, and add new tests for current issues #149, #144 and #167
Improve test failure detection and add new test for from-beginning flag as other tests depend on it
Small optimizations

Thanks to https://github.com/driskell
Merge branch 'master' of https://github.com/tzahari/logstash-forwarder into driskell_merge
Merge branch 'fix_tests' into driskell_merge
jls-lumberjack gem to 0.0.20 with version frame to allow backward compatibility
Implement protocol version 2 with long lived connections, partial acks, assertions and independent connection threads (thus no blocking, no timeouts, no reconnects and no "Too many option files" during redis congestion)
Merge branch 'protocol_improvements_and_server_client_improvements' into driskell_merge_pr164
Lumberjack gem spec version bump
Merge branch 'protocol_improvements_and_server_client_improvements' into driskell_merge_pr164