California Gurls was released at the end of May with the album in August. So even if the album is halfway done, that would give her another full month yet before she could potentially release the song of the summer, and then finish the album while the single is charting at #1. I don't think Teenage Dream was completely finished when CG came out.