AGENTS-102 Agents workers respond to TERM signal by deregistering from g...

...earman, completing work

This change updates the go baseworker to handle SIGTERM. It does this by listening for the
signal and running the specified sigtermHandler function for the worker. By default the worker
just calls Shutdown() and then exits, but implementers can overwrite this functionality if they
want custom behavior (for example the tests use this)