Make the poller sleep in intervals of 5 seconds to check if it should die rather than continue sleeping
Make the poller sleep in intervals of 5 seconds to check if it should die rather than continue sleeping

This makes it so that if Moksha hub needs to shutdown, it won't need
to wait for the whole sleep to complete. This is an issue because if
Moksha hub shuts down, the process won't die until the poller completes
its sleep. Additionally, the old code would cause the poller to execute
after the sleep regardless of whether or not the hub was dead, which
can cause errors if the hub is required by the poller.

mokshaproject/moksha,mokshaproject/moksha,mokshaproject/moksha,mokshaproject/moksha