Control of tunneling in a triple-well system: an atomtronic switching device