Convert THROW_ERRNO macro into a inline function

There's no need to use a macro for this. Switch to an inline function
instead.

Signed-off-by: Pekka Enberg <penberg@iki.fi>