A Massachusetts commercial cleaning company has agreed to pay nearly $1 million in penalties and restitution for violating the state’s wage and hour laws, the Massachusetts Office of the Attorney General announced Tuesday.