Morphological Phase Transitions in Spontaneous Dewetting of Thin Films on Homogeneous and Heterogeneous Surfaces