Fix misc. issues reported by Coverity.

Return value checks, time-of-check-time-of-use, some null ptr
checking stuff, and a use-after-free.

The implementation of __bro_list_val_pop_front (which had the
use-after-free issue) also looked incorrect in that it erased the entire
list, but it's documented as removing just the first element (which also
matches my expectation given the function name).  Didn't find any usages
of the function, so changed it to match docs/expectation.
Merge remote-tracking branch 'origin/fastpath'

* origin/fastpath:
  Fix misc. issues reported by Coverity.