fromCodeOrNull
Resolve a raw integer error value to its LibtorrentError, or null when code is outside the known range. Mirrors the bounds check in libtorrent_error_category::message(), which returns "Unknown error" for out-of-range values.