A court in the city of Sapporo has ruled Japan's ban on same-sex marriage is unconstitutional, setting the stage for further legal challenges to overturn the law.