Brazil treasury secretary quits, rattling markets