Option to limit browser integration to localhost only

This adds an option to limit the browser integration to localhost. This option is enabled by default as access to localhost is sufficient for the common use case (browser integration) and it is a possible security issue or at least not good practice to open an external port without need.

I made it an option as there are use cases to access this via the external use case, e.g. when using my own Picard Barcode Scanner app for Android.

This PR also fixes the issue that changes to browser integration were applied immediately without actually saving the options. This lead to inconsistencies when the user left the options without saving them.

@zas: Can you please take a closer look especially to the second commit, as you did the original implementation. I am not quite sure what your intention was on applying the option immediately and if I overlooked something.