A police detective inspector has been sentenced for using abusive words in a “burst of anger” outside a nightclub in Bournemouth on a night out.