Corrected client expiry

Problem: The code for dealing with a client expired event had
incorrect code and missing the forward declaration for
s_client_handle_ticket.

Solution: Corrected the incorrections and added a conditional
addition of the forward declaration of s_client_handle_ticket.