Move this error check out of the keyfile_get_NN functions into the
KEYFILE_GET macro. The macro uses a helper function from the context,
which can now cause the function to return early.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>