Massachusetts police officer shot by colleague during service of restraining order