Commonwealth countries have adopted the first ocean declaration during a summit held in the Pacific island nation of Samoa.