Two groups representing police officers in California and Oregon have backed legislation to legalize cannabis nationwide.