sync resolve already found index.js if "main" field in package.json was incorrectly specified (same way that nodejs does).
This fix makes async resolve behave the same way.
If the white space changes are a problem let me know. -- my vim is set up to remove unnecessary white space on save (I forgot about that).
adding tests to reproduce the problem
- resolver test shows that async resolve fails when main field in package.json is incorrect
- resolver_sync test shows that sync resolve finds index.js under same circumstance
async resolve now falls back to 'index.js' if main field in package.j…
…son is incorrect