Recursive promise resolution #4

Fixes #4. Implements recursive promise resolution and adds a test case.

Should also catch any looping resolutions by throwing error at a MAX_PROMISE iteration.