Implament background task for speed test

Using a UIBackgroundTask to ensure the speedtest
runs to completion.