A longtime manager at a Walmart store in the US state of Virginia has shot dead six people and injured six others.