Very likely you have a rogue app that was very likely side loaded and is very likely being restored upon reset of device. Popup Ads are built into apps that act as a Trojan and run as a background service.
Hard reset and do not restore. Add one by one until you find the crooked Clinton...