added indices on search key and id for mongo
closes https://github.com/NodeBB/NodeBB/issues/2077
fixed potential NaN issue https://github.com/NodeBB/NodeBB/issues/2077
fixed resetLockout
Merge branch '0.5.1' into csrf-excision