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.

1. Rename getBarcodeFromSelection to openBarcodeFromSelection
2. Rename getBarcodeFromLink to openBarcodeFromLink
3. Add new functions for getBarcodeURLFromSelection and getBarcodeURLFromLink
4. Use the new functions in the open*/show* functions instead of having duplicated code