i3companion/randr: Cache screen resources for a few seconds

randr.GetScreenResources() takes about 20ms to complete on my Thinkpad,
which is quite noticeable, especially when repeatedly tapping the
brightness keys, or holding them down.

This will cache the result of GetScreenResources for up to five seconds,
making things a whole lot smoother and responsive.
i3companion: Disconnect from X when not in use

Turns out if I don't disconnect, eventually X doesn't let me reconnect,
which happens on my Thinkpad after adjusting the brightness all the way
up/down eight or nine times.

Really I should just refactor the code so I can reuse the same
connection I am already keeping around for xkeybinder... later...
Merge branch 'master' into temp-merge