deferred: Add deferred.hh/cc

Just a basic class to call a function upon destruction. Will be used
to clean up the mess that is cl_main_frame.cc's frameloop function a
bit.
client: Move resource release to deferred function.

Avoids nesting the entire frameloop in a block and lets the function
act as a block. Since the objects will be destroyed in the correct
order (i.e., first in, last out), the deferred function should be
enough to keep this clean.

It's potentially a resource hog, but it's not in an area that matters
and I find it more readable as a result.
client: Ok, remove the block I previously added.

Shouldn't have pushed the commit with the indentation.. could've just
added the defer block and been done with it.