Refactor function cobbler.utils.is_mac

Use a precompiled and faster regular expression and add more tests.
timeit with 64M iterations: 48.32 versus 42.38 seconds.