An ex-trainee at Thames Valley Police has been banned from serving as a police officer after joking he would rape his female colleague.