[12348] Change gameobject_template storage to SQLHashStorage

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

(based on commit [12245] - 1cd91c6)