Spatial coherence measurement and partially coherent diffractive imaging using self-referencing holography