A Supreme Court decision has finally settled the long-running battle over whether family carers should be paid.