fix unit tests and move function hint type parsing into the tern worker.