Federal judge restores thousands of Virginians’ voting rights in historic ruling