Stable photoinduced charge separation in layered viologen compounds