Spglib: fix warnings
spglib changes so as to use proper exceptions whereas previously it would return None on failure.
That's very good but we now get a lot of warnings whenever we call spglib saying that we need to opt either in or out of this new behaviour.
Let's opt in then. This MR adds a wrapper which, for new spglib, silences the warning by setting an envvar. If spglib does return None (indicating old spglib) then we promote it to an exception.
Closes: #1858 (closed)
(The mechanism here is not thread-safe but threading does not seem to be a common use case, at least we haven't done much for thread safety.)
Checklist: x (done) or ~ (irrelevant)
Edited by Ask Hjorth Larsen