Actually, it is way easier to make "infinite" tools, and it does not require cheats. The item only lost durability if the block is broken with it selected, so, if you change the item selected just before the block is broken, you use the the "speed" of the good item, and loose the durability of the cheap one.
I have seen this being used to conserve golden tools (really fast, and with this cheat, infinite).
Yep! nice one found this out right when i started playing.