adding TTL support and tests

@sectioneight mind taking a look?
I suggested this pattern originally to allow an explicit `None` being passed in for no expiry, but I'm not sure if there's a more pythonic/better way to accomplish this. Thoughts?