Refactor resource alloc/release utils

This is just making the functions more generalized (which probably also
makes it clearer what the intent of calling them is).
Update the code to conform to the new APIs

This looks reasonably clean. We should look into more library code in
order to get code-style correct.
Fix minor problems with `ProgressBar`

I choose not to hide cursors by default, at that level of granularity.
This makes it easier to handle restoring the cursor's visibility on a
user interrupt. This also fixes buffering for the spinner.
Add an example for the `spinner` interface

Run with:

    make spinner
    ./dist/build/questioner-spinner/questioner-spinner