Synchrotron X-ray scattering studies of anomalous oxygen order in superconducting mercury barium copper oxide and of charge-transfer excitations in related undoped lamellar copper oxides