inventory: new framework for discovering things about the system

@estenberg @zzamboni @nickanderson please review before I start filling this out with specific code