radix: don't modify node prefix on lookup

The radix tree stores user data. However, it had no function to return
this data to the consumers of the API. Instead, on lookup, it would
set a field "user_data_result" in the nodes prefix structure which
could then be read by the caller.

Apart for this not being a very nice design as it exposes API internals
to the caller, it is not thread safe. By updating the global data
structure without any form (or suggestion) of locking, threads could
overwrite the same field unexpectedly.

This patch modifies the lookup logic to get rid of this stored
user_data_result. Instead, all the lookup functions how take an
addition argument: void **user_data_result.

Through this pointer the user data is returned. It's allowed to be
NULL, in this case the user data is ignored.

This is a significant API change, that affects a lot of tests and
callers. These will be updated in follow up patches.

Bug #1073.
radix: update tests after API change

This patch updates all the radix tests to the new API. In most cases
it just passes a NULL user data return pointer.

It also removes the tests related to SC_RADIX_NODE_USERDATA, as this
macro is removed.

Bug #1073
radix: update HTP config lookup logic

The HTP config tree is a radix. The lookups are updated to the new API.
The return of user_data is treated as a succesful lookup, instead of
the node itself.
defrag: update radix usage

Update defrag timeout lookup to use the updated radix API.

The return of user_data is treated as a succesful lookup, instead of
the node.
unused reputation: radix update

Update the unused reputation code to compile after radix update.
host-os-info: update radix lookups

Update host OS lookups to use the new API.

The return of user_data is treated as a succesful lookup, instead of
the node.
detect ip-only: update radix usage

Update IP-only lookups to the changed radix API.

The return of user_data is treated as a succesful lookup, instead of
the node.
debug-validation: fix packet check

On fragments and invalid packets we can have p->proto set, while the
matching protocol header pointer is null.
ipv4 decoder: set 'invalid' event on icmpv6

ICMPv6 on IPv4 is invalid, so if we encounter this we set an event
and flag the packet as invalid.

Ticket #1105.
Flow: fix flow reference cnt issues

FlowReference stores the flow in the destination pointer and increases
the flow reference counter (use_cnt). This should only be called once
per destination pointer. The reference counter is decremented when
FlowDereference is called. Multiple FlowReference calls would lead to
multiple use_cnt bumps, while there would be only one FlowRereference.
This lead to a use_cnt that would never become 0, meaning the flow
would stay in the hash for the entire lifetime of the process.

The fix here is to check if the destination pointer is already set to
the flow. If so, we don't increase the reference counter.

As this is really a bug, this condition will lead to a BUG_ON if the
DEBUG_VALIDATION checking is enabled.
Bug 1107: decoders: bail out on pseudo packets

Flow-timeout code injects pseudo packets into the decoders, leading
to various issues. For a full explanation, see:
  https://redmine.openinfosecfoundation.org/issues/1107

This patch works around the issues with a hack. It adds a check to
each of the decoder entry points to bail out as soon as a pseudo
packet from the flow timeout is encountered.

Ticket #1107.
af-packet: declare TP_STATUS_VLAN_VALID if needed

Some old distribution don't ship recent enough linux header. This
result in TP_STATUS_VLAN_VALID being undefined. This patch defines
the constant and use it as it is used in backward compatible method
in the code: the flag is not set by kernel and a test on vci value
will be made.

This should fix https://redmine.openinfosecfoundation.org/issues/1106