Add DB class, switch Secure::compare() to use hash_equals() if it exists, then a loop if it doesn't