Add braces around if statement.
ref_counter_t: Use lock_guard instead of explicit lock/unlock calls.

Safer for exceptions and such. Basically just ensures the lock won't
remain locked in case of an error.
ref_counter_t: Use reinterpret_cast instead of C-style casts.

Just because the compiler will tell me if it's doable. Hopefully.
config: Define __has_extension when unavailable.
config: Define S_DEPRECATED(reason)

To better mark things as deprecated.
ref_counter_t: Mark ref_counter_t as deprecated.

This is still in use by snow and I can't pull it out just now, but I
plan on replacing it with something a little better designed in the
future. In the meantime, it's deprecated just so I remember not to use
it.