'Dishing out punishment': Ex-Calif. cop testifies he intentionally caused pain during arrests