mark background task as ended when OS calls the expiration handler
Merge pull request #61 from stefanprutianu/master

mark background task as ended when OS calls the expiration handler