Early formation of massive, compact, spheroidal galaxies with classical profiles by violent disc instability or mergers