The government apologized Thursday for illegally targeting tea party groups for intrusive scrutiny and agreed to settlements with hundreds of organizations snared in the targeting, bringing to a close one of the more embarrassing episodes of the Obama administration. Attorney General Jeff Sessions said the IRS owed the groups an apology after years of poor treatment…