A Wetherspoons doorman planted a fake bomb inside the toilets of a popular pub so he could “play the hero” has been jailed.