News Corp posts $817m loss after falls in value of newspaper and pay TV assets