40,000 ex-prisoners in Maryland given voting rights