Re-implement synchronous task set release support

The old implementation had the problem that the first job release of all
tasks was handled on the *same* CPU (that triggered the synchronous task set
release). This could result in significant latency spikes.

The new implementation uses a completion per task. Futher, each task programs
its own release, which ensures that it will be on the proper processor.
Remove complete_n() API

The LITMUS^RT-specific completion API complete_n() is no longer
required by the synchronous release code. Let's remove it; one less
modification of a core Linux file to maintain during rebasing.
FDSO: make sure fdso_close() is called during task teardown

When a task exists and its FDSO table is released, the locking
protocol's 'close()' callback should be invoked to do proper
protocol-specific cleanup (such as unlocking the resource, if
required).
ftdev: don't hold lock while sleeping

Holding the lock prevents other tasks from opening the device.
Feather-Trace: keep track of PID in trace record

To properly trace locking overheads, it is required to tell apart
samples from different tasks, which requires keeping track of their
PIDs.

The timestamp is shortened to 48 bits to make room for the PID.
Feather-Trace: update locking timestamps

Reassing locking timestamps and prepare support for tracing
system call overheads.
Feather-Trace: add support for locking-related syscall overheads

Support recording timestamps that allow tracing the entry and exit
costs of locking-related system calls.
Export IRQ count to control page

Also add some compile-time checks to detect unexpected offsets.
Use user-provided irq count for TS_SYSCALL_IN_END

To detect interrupts that interfered after the initial time stamp was
recorded, this patch changes sched_trace to also record the IRQ count
as observed by userspace.
Make Feather-Trace timestamp collection non-preemptive

If the tracing code is interrupted / preempted inbetween the time that
a sequence number is drawn and the time that the trace recorded is
allocated, then the trace file will contain "out of order" events.
These are difficult to detect during post-processing and can create
artificial "outliers". This patch briefly disables local interrutps to
avoid this.

While at it, de-duplicate the timestamp recording code.
Mark feather-trace buffers as "disturbed" on soft IRQs

We don't want outliers due to soft IRQs, so let them mark ongoing
traces as "dirty" as well.
Trace IPI-related IRQs with ft_irq_fired()

IPIs have some special cases where irq_enter() is not called. This
caused ft_irq_fired() to "miss" some rescheduling-related interrupts,
which in turn may cause outliers.

This patch makes sure ft_irq_fired() is called on scheduling-related
IPIs.
Feather-Trace: hide irq in SEND_RESCHED_END

SEND_RESCHED_END is necessarily preceded by an interrupt. We don't
want to filter events based on this expected interrupts, but we still
want to detect samples disturbed by other interrupts. Hence, subtract
one off the interrupt count.
Move SCHED2 trace points to post_schedule()

Linux's post_schedule() scheduling class hook more closely matches
what SCHED2 is supposed to trace, namely any scheduling overhead after
the context switch. The prior trace points caught timers being armed
from finish_switch(), which is already included in the context switch
cost CXS.

(This patch essentially reverts 8fe2fb8bb1c1cd0194608bc783d0ce7029e8d869).
Move SEND_RESCHED tracing to preempt.c

The SEND_RESCHED is really only interesting if the IPI was generated
by LITMUS^RT. Therefore, we don't need to trace in Linux's
architecture-specific code. Instead, we hook into the preemption state
machine, which is informed about incoming IPIs anyway.
P-FP: record job release records for tardy tasks

When a job was tardy, the plugin failed to invoke sched_trace. This
caused ugly "holes" in the visualized schedule.
P-FP: simplify boost_priority()

boost_priority() is only applied to already-scheduled tasks. Remove
the (untested and unneeded) case handling unscheduled tasks, which was
likely not correct anyway.
P-FP: simplify priority comparison

Make the priority comparison easier to read. Also, remove the "equal
PID" clause and insert a corresponding BUG_ON() instead; this should
really never happen.
P-FP: prevent misuse of priority queue

Stop hard-to-detect out-of-bounds errors early.
P-FP: use proper CONFIG_ symbol

It's CONFIG_LITMUS_LOCKING, not just CONFIG_LOCKING...