iprep: fix reputation loading and reloading

When an IP is listed in multiple categories, each new "load" would clear the
previous loads for that IP.

Bug #976
Don't initialize threshold before rules on delayed detect. Bug #999.
Reset both sides of the de_state on rule reload. Bug #998.
threshold: register threshold host storage. Related to bug #991
storage: fix freeing storage

Fix freeing storage. Also add workaround for unittests that don't
(fully) setup storage.

Bug #991.
Add a /* fall through */ comment for all switch case fall throughs.

This should server as a message to coverity that the fall through is
intentional.
Clean up function syntax

Remove space before ( in function names. Put { on new line.
Make tests static.
Correct indentation and wording of comments.