New timer implementation

This is first part of new softserial code. Main timer code is changed, changes to rest of code are kept to minimum.

macros for BASEPRI based synchronization are added to project (atomic.h)

TIMER_PERIOD fixed in pwm_rx.c
Merge remote-tracking branch 'refs/remotes/upstream/master' into feature-timer
Code cleanup / fixed missing TIM8_UP handler
Fixed original softserial code

Bit end timer must by shifted by half-bit period to startbit edge, so that next edges are in middle of bit interval. This behavior was masked with old timer code, but noise immunity was probably very low.
Merge remote-tracking branch 'refs/remotes/upstream/master' into feature-timer
Merge pull request #160 from ledvinap/feature-timer

New timer implementation