Now that the api-end macro is back in the right place, we no longer need
to explicitly map the WT_NOTFOUND return, we can use API_END_NOTFOUND_MAP
macro.

Also, the API_END_NOTFOUND_MAP macro has a return, no need for an explicit
one.
Coverity scan 1223777, don't leak the FILE handle if we have an error return.
I can never remember which version of API_END has the return call and
which doesn't; create API_END_RET and API_END_RET_NOTFOUND_MAP, leave
API_END for functions without any return value.