Add circuit simulator.

If I'm not mistaken this implementation of circuit simulator works in O(n * m). Where n - number of circuit elements, and m - average number of connections between them. Each element is defined by a table of values on input and output. So it's easy to add new one. Actually there are some problems with loading circuit when map is loaded. Also each block can have on_activate and on_deactivate methods.