D-theory: field theory via dimensional reduction of discrete variables