Added background task system

The background task can be used for any background api stuff, but all
crammed into one function. Also updated the todo file accordingly.