Teal and Memory Efficiency

for further discussion: https://github.com/algorand/go-algorand/pull/1763