Add const for Packet * in flow functions.

By moving FlowReference() out of FlowGetFlowFromHash() and into the one
function that calls it, all the flow functions take const Packet * instead
of Packet *.

Passed all regression tests:
https://buildbot.suricata-ids.org/builders/ken-tilera/builds/69
https://buildbot.suricata-ids.org/builders/ken-tilera-pcap/builds/6

This replaces PR 631 (branch flow-const) and is simply rebasing to master to pass regression tests.