Turn some license strings into lib.licenses values

Covers the easy-to-convert things where we could guess at what the lib.licenses value should be.

It would probably be clever to first push onto separate branch for Hydra to build to see whether this doesn't break anything.

See #2999 and #739 for discussion.