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.
Do not follow where the path may lead, go instead where there is no path and leave a trail - Ralph Waldo Emerson