fix #1180 Limit call stack in IE

When the `loadFile` method is called, if the file is already available in the AT cache the callback is called synchronously. This leads to a growth of the function call stack which can transcend the limit imposed by some browsers, which leads to an error.
This commit adds a limitation to the number of synchronous file loads, setting a timeout to break javascript execution when the limit is exceeded.