High court to examine religious liberty, foster care by same-sex couples