Efficient Execution of User-Provided Graph Algorithms in a Graph Database