litmus/P-FP/PCP: Use list_first_entry_or_null() to obtain system ceiling

On an empty list, the list heads next and prev pointers point to
itself. Previous code assumed this was zero and returned the lists
head as a ceiling, leading to undefined behaviour.

Signed-off-by: Roy Spliet <rspliet@mpi-sws.org>