another small patch - prevent duplicate consecutive lines

this is a matter of taste I suppose, but I like the way bash handles this, if I run the same query over and over again, this patch makes sure it is not added to the history more than once (for consecutive commands only, of course).
this is useful if you are running a bunch of queries to test some ongoing process.