Poland has left same-sex couples “in a legal vacuum”, found the European Court of Human Rights.