It is not neccessary to pass the graph database handle to JoernIndex in scripts.
Better solution: add joernsteps-closures to global scope.
Added a functionId property to AST nodes. The property is indexed, allowing us to quickly retrieve all AST nodes of a given type and functionId.