cast pthread to ulong in cpu_seqid

This patch adds a cast of pthread_self in CPU_SEQID definition.
This fixes a build time error, resulting from comparing types
pthread_t and int, on alternate platforms.
ensure arc.c finds HZ

Current glibc includes linux/param.h from sys/param.h. When
building with alternate libc, build error results from lack
of HZ definition. This patch adds a direct include for
linux/param.h, to ensure that HZ gets defined.
ensure dev_t defined

Current glibc includes sys/types.h from stdlib.h. When
building with alternate libc, a build error results from
undefined type. This patch adds an include for sys/types.h,
to ensure that dev_t gets defined.
ensure rlim64_infinity defined

Several files make use of the RLIM64_INFINITY macro available
from current glibc's sys/resource.h. This patch adds a local
sys/resource.h, to offer a fallback for alternate libc's
that do not provide this macro, and updates the relevant
files to include the new header.