Formation of InAs quantum dots and wetting layers in GaAs and AlAs analyzed by cross-sectional scanning tunneling microscopy