Add generic entrypoint and run loop in TestWebKitAPI