Add get_required_callable_args utility function

Move code that gets callable args from functor task to utils.py and
enhance it to support more use cases.

We do not rely on naming conventions for 'self' and 'cls' parameters any
more; we look at the collable if it is bound method instead.

Change-Id: Ie1a9a7cc727b5fbc2780aba28b1d0253e5bc0ea4
Merge "Add get_required_callable_args utility function"