Treasury officials could have avoided the explosive controversy over American International Group bonuses if they had carefully examined the company’s compensation system, government investigators reported.