Emotional funeral held for slain police officer