Faceting instability in the presence of wetting interactions: A mechanism for the formation of quantum dots