Coastal salt marshes - once seen as "wasteland" to be reclaimed for farming and industry - play a vital role in offsetting emissions, a study has found.