The attorney general’s office accused CVS of breaking Massachusetts laws that help keep drug costs low for people injured on the job.