Slovenian voters have rejected by a large margin a law that would have given same-sex couples the right to marry and adopt children, Slovenia's government says.