A police officer in Pennsylvania lost her job after posting a Snapchat selfie showing herself in uniform — and using a racial slur.