Use "last seen UID" in ImapFolderAgent

Here's an enhancement for ImapFolderAgent as previously discussed in #328.

This PR also includes an addition of Agent#boolify.  Actually, I wasn't aware that agents are supposed to accept boolean options in strings ("true"/"false"), which my ImapFolderAgent did not support.  Is this due to a limitation of the JSON editor?  In any case, I think it would be nice if we had a handy way to parse a boolean value rather than performing `== "true"`, and that's why I'm proposing to add #boolify for use from agents.  What do you think?