How can I run bitcoind on test and production networks, at the same time, on the same computer?
You can run a mainnet and testnet bitcoind next to eachother without problems. They do not share the same database (one will use the testnet3/ subdirectory).

What will conflict is the RPC port, as they will both try to bind to port 8332 for receiving RPC connections. Use -rpcport=N on one of them to use a different port.