core: use head and tail for ticket lock

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>
core: put ticket spinlock in a C file for easier profiling

current performance:

PERFORMANCE_COUNTER node-count = 4
PERFORMANCE_COUNTER worker-count-per-node = 7
PERFORMANCE_COUNTER actor-count-per-worker = 100
PERFORMANCE_COUNTER worker-count = 28
PERFORMANCE_COUNTER actor-count = 2800
PERFORMANCE_COUNTER message-count-per-actor = 40000
PERFORMANCE_COUNTER message-count = 112000000
PERFORMANCE_COUNTER elapsed-time = 88.705164 s
PERFORMANCE_COUNTER computation-throughput = 1262609.687743 messages / s
PERFORMANCE_COUNTER node-throughput = 315652.421936 messages / s
PERFORMANCE_COUNTER worker-throughput = 45093.203134 messages / s
PERFORMANCE_COUNTER worker-latency = 22176 ns
PERFORMANCE_COUNTER actor-throughput = 450.932031 messages / s
PERFORMANCE_COUNTER actor-latency = 2217629 ns

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>