Reduce code duplication for context menu items

The current getBarcodeFromLink/getBarcodeFromSelection functions actually open new tabs rather than returning information, and there is duplication of code between the get*/show* functions.

This pull request:

1. Renames getBarcodeFromSelection to openBarcodeFromSelection
2. Renames getBarcodeFromLink to openBarcodeFromLink
3. Adds new functions for getBarcodeURLFromSelection and getBarcodeURLFromLink
4. Uses the new functions in the open*/show* functions instead of having duplicated code