Added quad encoder, moved clock ISRs to functions

The clock ISRs are functions now, also #define CLOCK_NO_ISR suppresses
the generation of an ISR. This way, user code can extend the clock ISR as it
needs.