[z2167] Change gameobject_template storage to SQLHashStorage

Also use direct-data iterators instead of lookup-entry calls

(based on commit [12245] - 1cd91c6)

(based on commit [s1799] - 1c0de2f)