Make public versions of private tensor utils
# What does this PR do?

This PR makes public versions of `_is_torch`, `_is_tensorflow`, `_is_numpy` and `_is_jax` that are safe to use even when those frameworks are not installed, as I need them for some future PRs. The same functions have also been written independtenly by @amyeroberts in image_utils, this PR puts them in the generic utils and remove the use of the private ones.