A Macroprudential Theory of Foreign Reserve Accumulation