Nanoscale Bubble Domains and Topological Transitions in Ultrathin Ferroelectric Films