Cu K-edge XANES of (La1-xSrx)2CuO4, YBa2Cu3Oy and related Cu oxides. valence, structure and final-state effects on 1s-4pπ and 1s-4pσ absorption