Store string trap id for terrain in an actual string.

The previous solution of overloading an int field to hold a pointer would break on 64-bit builds because the int is still 32 bit and the pointer is now 64-bit.