Fixed signal handlers and now rail functions are thread-safe
It's more workaround then really fix. I need to test on dev board first
to see if evloop isn't bottleneck of the whole system