Multiwavelength campaign on Mrk 509 VI. HST/COS observations of the far-ultraviolet spectrum RID B-4804-2010