Natural defences worth millions are protecting communities across Wales, including Newport, from the threat of coastal flooding, according to a new report.