Factory reset won't unroot your phone. Factory reset wipes out all user data, but doesn't remove root. In fact, if you have a custom ROM installed, it will still be there as well.
You can either use Pete's Motorola Tools to unroot it or else, you will have to SBF it to get it back to being unrooted. SBF will also put it back to stock as well.