Fix bug in Connection::FlipRoles, addresses BIT-1148.

It didn't swap address values right and also didn't consider that
analyzers might be scheduled for the new connection tuple.

Issues were reported by Kevin McMahon, thanks.
Refactored formatters and updated the the writers a bit.

 - Formatters have been abstracted similarly to readers and writers now.
 - The Ascii writer has a new option for writing out logs as JSON.
 - The Ascii writer now has all options availble as per-filter
   options as well as global.
Added an option to the JSON formatter to use ISO 8601 for timestamps.

 - It's not *exactly* ISO 8601 which doesn't seem to support
   subseconds, but subseconds are very important to us and
   most things that support ISO8601 seem to also support subseconds
   in the way I'm implemented it.
Teach async DNS lookup builtin-functions about BRO_DNS_FAKE.

And enable fake DNS mode for test suites.

Addresses BIT-1134.
Merge branch 'master' into topic/jsiwek/flip-roles
Improve analysis of TCP SYN/SYN-ACK reversal situations.

- Since it's just the handshake packets out of order, they're no
  longer treated as partial connections, which some protocol analyzers
  immediately refuse to look at.

- The TCP_Reassembler "is_orig" state failed to change, which led to
  protocol analyzers sometimes using the wrong value for that.

- Add a unit test which exercises the Connection::FlipRoles() code
  path (i.e. the SYN/SYN-ACK reversal situation).

Addresses BIT-1148.
Ascii input reader now supports all config options per-input stream.
Expanded support for modifying the timestamp format in the JSON formatter.
Updating a couple of tests.
Merge remote-tracking branch 'origin/topic/jsiwek/flip-roles'

* origin/topic/jsiwek/flip-roles:
  Improve analysis of TCP SYN/SYN-ACK reversal situations.
  Fix bug in Connection::FlipRoles, addresses BIT-1148.

BIT-1148 #merged
Merge remote-tracking branch 'origin/topic/jsiwek/dns_fake'

* origin/topic/jsiwek/dns_fake:
  Teach async DNS lookup builtin-functions about BRO_DNS_FAKE.
Refactoring code to reuse ApplyScheduledAnalyzers().

This is potentially changing the exact time when the
scheduled_analyzer_applied() event is executed, but that should be
fine afaict.
Merge remote-tracking branch 'origin/topic/seth/json-formatter'

* origin/topic/seth/json-formatter:
  Updating a couple of tests.
  Expanded support for modifying the timestamp format in the JSON formatter.
  Ascii input reader now supports all config options per-input stream.
  Added an option to the JSON formatter to use ISO 8601 for timestamps.
  Refactored formatters and updated the the writers a bit.

Includes some minor bugfixes and cleanup at various places, including
in old code.
Fixing (very unlikely) double delete in HTTP analyzer when decapsulating
CONNECTs.

BIT-1149 #closed