New methods in the analysis of electron density and electron localizability - applications to X-O-X systems (X = C, Si)