Protecting mangroves to lock carbon away in trees may be an economic way to curb climate change, research suggests.