Improved threaded queries in json_prolog.
Fixed behaviour of highlight_trajectory. Must use  in order to avoid redundant solutions.