Disabling the ssh parser temporarily, since we are moving away from some
of the archaic features we use in the app layer. We will reintroduce this
parser shortly. Also do note that keywords that rely on the ssh parser
would now be disabled.
Use a typdef AppProto <-> uint16_t for representing app layer protocol.

Some minor refactoring/cleanup, including renaming functions.
App layer API rewritten.  The main files in question are:
app-layer.[ch], app-layer-detect-proto.[ch] and app-layer-parser.[ch].

Things addressed in this commit:
- Brings out a proper separation between protocol detection phase and the
  parser phase.
- The dns app layer now is registered such that we don't use "dnstcp" and
  "dnsudp" in the rules.  A user who previously wrote a rule like this -

  "alert dnstcp....." or
  "alert dnsudp....."

  would now have to use,

  alert dns (ipproto:tcp;) or
  alert udp (app-layer-protocol:dns;) or
  alert ip (ipproto:udp; app-layer-protocol:dns;)

  The same rules extend to other another such protocol, dcerpc.
- The app layer parser api now takes in the ipproto while registering
  callbacks.
- The app inspection/detection engine also takes an ipproto.
- All app layer parser functions now take direction as STREAM_TOSERVER or
  STREAM_TOCLIENT, as opposed to 0 or 1, which was taken by some of the
  functions.
- FlowInitialize() and FlowRecycle() now resets proto to 0.  This is
  needed by unittests, which would try to clean the flow, and that would
  call the api, AppLayerParserCleanupParserState(), which would try to
  clean the app state, but the app layer now needs an ipproto to figure
  out which api to internally call to clean the state, and if the ipproto
  is 0, it would return without trying to clean the state.
- A lot of unittests are now updated where if they are using a flow and
  they need to use the app layer, we would set a flow ipproto.
- The "app-layer" section in the yaml conf has also been updated as well.
Various style fixes
compile fixes
profiling: fix compilation

Stream engine can't access app layer proto detection datatypes
anymore, so moved some of the logic into app-layer.c
scan-build fixes
Cleanup and fix scan-build warning

Add comments and slightly refactor to make function more understandable
and fix a scan-build warning too.
app proto detect: fix valgrind test warnings

Only in unittests when debug is enabled would valgrind warn about
a print statement.
Fix AppLayerProtoDetectPMFreeSignature related valgrind errors
App Layer: fix memory leaks

Call FlowCleanupAppLayer before setting f->proto to 0, as the former
bails out without doing anything if proto is 0.
detect unittests: clang build fix and cleanups

A number of unittests would lead to clang build errors because
of unsafe det_ctx ptr usage. This patch fixes these and inits
det_ctx to NULL in the other detect tests.
Rename AppLayerCtxThread -> AppLayerThreadCtx
Rename AppLayerParserCtxThread -> AppLayerParserThreadCtx
Rename AppLayerParserpCtx -> AppLayerParserProtoCtx
Rename AppLayerParserParserState -> AppLayerParserState
Rename AppLayerProtoDetectCtxThread -> AppLayerProtoDetectThreadCtx
App Layer: cleanup state func naming

Rename functions related to AppLayerState to be more consistent.
Use u8 for ipproto

In a few places in app layer and unittests u16 was used.
app layer: uint16_t alproto -> AppProto alproto

This conversion was missing in a couple of places.