Added has{Agent,Good,Market,Other}(id) method

Without this there was no nice way to find out if a stored id still
actually exists in the simulation (you could do it by catching an out of
range exception from sim->agent(id), but that's not a "nice" way).