Gay marriage ban fails to pass US Senate