Optimize DetectPrefilterMergeSort
Fix clang warning

Clang doesn't seem to like defining a function within a function.
Fix compiler warnings to now compile with -Werror

Fixed signed vs unsigned comparisons.
Implement MPM opt for ac-bs and ac-gfbs

Copies sids changes from ac.