Added AND,OR,NOT, XOR gate templates and urls

Made one urlrule+view function for each gate
Added templates for and,or,not,xor with header footer etc