Trying to track down old phrases like this can be frustrating: I've spent quite some time at it. Both explanations make sense but I'm inclined to go with O.P.'s because my Dad was a gunsmith. I remember him blueing rifle barrels -- a dangerous process requiring cyanide as I remember. I'm not sure what "blued" refers to about being shanghaied unless it's an oblique reference to the blue ocean or a Navy blue uniform.
That's true, and I have no dogs in the fight. However, OPs gun explanation doesn't do much for tattooing.