A man has been charged with impersonating a police officer and carrying an imitation firearm after a bomb squad was called to Bournemouth.