Added OP_SWAP and OP_DUP

and added VMObject addTemplate and getTemplate test.