flowvars: update funcs to accept u16 id

All id's are u16, but flowvar functions would only accept u8.

Minor cleanups.
flowvar: fix deadlock with http buffers

Bug #802

Flowvars are set from pcre, and lock the flow when being set. However
when HTTP buffers were inspected, flow was already locked: deadlock.

This patch introduces a post-match list in the detection engine thread
ctx, where store candidates are kept. Then a post-match function is used
to finalize the storing if the rule matches.

Solves the deadlock and brings the handling of flowvars more in line
with flowbits and flowints.
flowvar: add unittests for #802.
flowvar: clean up properly on signature clean up.