Why was this transaction allowed on testnet?
For example, bitcoin core 0.10 enables only 40 bytes in OP_RETURN, but I'm not sure if 0.10 is the latest version allowed on the testnet.


40 bytes in OP_RETURN has always been legal. It was just non-standard, meaning that the standard client wouldn't mine or relay those transactions, but would allow them if they were already in a block.

However, testnet disables all standardness rules.


  Is the code for the testnet differences within the most recent bitcoin github repo, or is it a separate repo I must download, compile, and point towards the testnet?


It's the same program with the -testnet switch passed at the command line. (Or in your bitcoin.conf. Either works.)