CIBC posts lower third-quarter profit as bad loan provisions rise