Patch by Strum. Ticket #451 - Convert all mongokit style .find, .find_one, .one calls over to SQLAlchemy queries
Patch submitted by mrb.

Fix to link to the pubsub hub for atom_feed 'by tag'.

Added 'rel': 'alternate' and 'type': 'text/html' to 'atomlinks'
add login option: stay_logged_in

As proposed in issue #354; it adds an attribute max_age
to mediagoblin.tools.session.Session  that is passed to
response.set_cookie;  max_age is set to 30  days if the
checkbox is selected
save “stay_logged_in” in the session

Since sessions are rebuilt, e.g. when you try to post a blank
comment and therefore receive an error message, the session will
be overwritten without the old max_age.
updated to new render_divs macro