minor updates for gibbs.hxx
minor updates for graphicalmodel_factor.hxx
add interface to get internal ids to variable and factor elements