Understanding clock domain crossing - synchronizers, metastability, pulse transfer, gray code, and why 2-flop sync only works for levels