Cache plugin dir contents for performance

Adds caching to `Plugin.HasDir` so each plugin dir is scanned once and cached between calls. Addresses performance problems in `HasDir`, `IsLibrary`, and `maktaba#library#Import`/`maktaba#library#Require` (#29).

On my system, it shaves off 20–30ms today and ~100ms from the addon-info.json branch (#28).

It does mean newly-added directories won't be detected, which might bug plugin developers here and there. But if that becomes a problem, we can add a mechanism to reload plugins or something.