Bug 962577 - Refactor webapps actor's _connectToApp to make it reusable. r=ochameau