The clustering and bias of radio-selected AGN and star-forming galaxies in the COSMOS field