Refactor: fencer: create reply inside API request handling
Previously, handle_request() would set need_reply to true or false when
handling the request, then create and send the reply if needed at the end.
Now, the reply is created when handling the request if needed, and the reply is
sent at the end if reply is not NULL.
This creates a small amount of code duplication but will make planned
refactoring easier.