mainloop: Simplify the keepalive functions
mainloop: Simplify the keepalive functions

Moving the "compare values + update timeout" logic into a helper function
lets us delete several duplicated checks and temporary variables.

[dwmw2: Fix up conflicts with commit a983aed4]

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

Conflicts:
	mainloop.c

liiir1985/openconnect,matlockx/openconnect,matlockx/openconnect,brandt/openconnect,mveplus/openconnect-client,neshema/openconnect,liiir1985/openconnect,don-johnny/openconnect,lins05/openconnect,nmav/openconnect-mine,atyndall/openconnect,nmav/openconnect-mine,nmav/openconnect-mine,nmav/openconnect-mine,cernekee/openconnect,atyndall/openconnect,matlockx/openconnect,atyndall/openconnect,chadcatlett/openconnect,brandt/openconnect,matlockx/openconnect,lins05/openconnect,brandt/openconnect,chadcatlett/openconnect,mveplus/openconnect-client,don-johnny/openconnect,cernekee/openconnect,lins05/openconnect,mtmiller/openconnect,don-johnny/openconnect,neshema/openconnect,mtmiller/openconnect,neshema/openconnect,cernekee/openconnect,atyndall/openconnect,neshema/openconnect,brandt/openconnect,mveplus/openconnect-client,lins05/openconnect,mveplus/openconnect-client,mtmiller/openconnect,cernekee/openconnect,chadcatlett/openconnect,liiir1985/openconnect,chadcatlett/openconnect,don-johnny/openconnect,mtmiller/openconnect,liiir1985/openconnect