AIG investment advisory unit to pay $40 million to resolve SEC charges