extern "C" fix, cleanup of identifers, documentation.
trell_job_rpc_handle seems to work with new code.
Migrated query code paths