Ditto on the 9mm for beginners. Ammo is cheaper = more practice. You could have one magazine full of 115gr FMJ for target use and another one with 147gr +p hollow points for home defense. 9mm+p ammo is about as efective as 40S&W for defense purposes.
Since you are debating between an M&P 40 and CJ P-07 in 9mm, why not compromise and get an M&P 9.
"The worst place to have your happiness is in sombody else's head" -Lester Sumrall