Novel Cascadable Magnetic Majority Gates for Implementing Comprehensive Logic Functions