Speed up ratelimit tests

Few changes to speed up the ratelimit tests and make those tests not use the database, as it's not required for the purpose of them.