Maryland voters approve gay marriage, Maine poised to do so