A detective who worked at an Oldham police station has been jailed after he sexually assaulted two co-workers.