core: added callable inspection function

Used to extract functions and self arguments from functions/methods