Cubans have approved a sweeping “family law” code that would allow same-sex couples to marry and adopt as well as redefining rights for children and grandparents, officials said Monday, though opposition in the national referendum was unusually strong on the…