Fix Download Link context menu item

The original patch developer forgot to write the event code to pass the
click event to the main browser app. This commit implements it.
Fix Share dialog bugs

- fix download icon display logic
- add app detection code for Sparrow share option
Prevent original DB perms overwrite on upgrade