All-metallic electrically gated 2H-TaSe2 thin-film switches and logic circuits