There have been too many discussions on this topic.
There should be no problem in changing the job unless your sponsoring employer launches a complaint with USCIS. Leaving the job early is debatable as one might have no intention to leave the job at the time of approval but say 1 month later he/she changes mind and leaves the employer in good terms.
The clause that one should be with the sponsoring employer for atleast 2 years was removed long back.
In case you are approved and your spouse is pending then it might make sense to wait for a while, but waiting for about 3 months should be more than enough especially when the GC process itself takes about 3+ years in most cases.
I personally know a few families who were naturalised in past 1 year and primary applicant had left their sponsoring employer quite soon and were never asked about it.
----------------------------------------------------
I am not a lawyer, this is just my personal opinion