Perry signs anti-gay pledge, vows to support federal marriage amendment