Module manager foundation

As you told me this could be PR'd, here it is. There might be some cleanup needed before it's merged (especially in light of your upcoming https://github.com/Cellule/tsd-link integration), but we have to keep in mind this is only a stepping stone towards #154.