Fix the geofencing test to not break if the promises resolve asynchronously.

Also add a similar test to make sure the API exists/rejects in service workers.

BUG=383125

Review URL: https://codereview.chromium.org/543203003

git-svn-id: svn://svn.chromium.org/blink/trunk@181855 bbb929c8-8fbe-4397-9dbb-9b2b20218538