wiredep method refactor

Well, this is also a very opinionated PR but I'm also submitting it to ultimately let you guys decide wether it's something you want to see on **wiredep**.

The PR is basically just a refactor of the top level `wiredep` method, moving functionality to other internal modules, following the same pattern used for `lib/detect-dependencies` and lib/inject-dependencies`.

I started working on it as it would help me on the customization of my own fork and I thought it could be a nice thing to contribute to the project.