Make `can_generate` as class method
# What does this PR do?

Make `can_generate` as class method, so we can check a model (class) can generate or not without loading/creating a model instance.

(The goal of this PR is not to address the issue regarding how to check `is_encoder`, `is_decoder` etc. discussed offline).
_The documentation is not available anymore as the PR was closed or merged._