Investors are pouring cash into emerging-market funds at a record pace as momentum builds for a rotation out of US assets.