Generators changes:
- take captchaoptions as argument, so no longer require config.get or captchas db imports
- return the captcha object (gm instance) and solution (whatever).
The model itself inserts the solution to db, gets captchaid for filename and cookie, and writes the image to disk.
Slightly cleaner imo, and makes the captcha generators more testable without requiring any mocking for DB/config.
maxAge=Math.abs((randomCaptcha.expireAt.getTime()+maxAge)-Date.now());//abs in case mongo hasn't pruned, and will not be too big since it can't be too far away from pruning anyway