Beijing is striving to encourage more young people to get married and have children as it bids to arrest the country’s demographic decline.