Fix custom protocol registration

Minor issue: registration of custom protocol handler is performed on each page load. In some versions of Firefox, this causes constant notifications saying “Twister has already been added as an application for web+twister links.”

Solution: before doing it, check if it has already been registered.