China’s financial hub of Shanghai eased homebuying rules, in the latest attempt by authorities to contain the nation’s prolonged property slump.