Check that system call numbers are within range

Otherwise, the user could cause the kernel to dereference an arbitrary
function pointer.
Force CSR macros to operate on unsigned longs

Using typeof to determine the CSR's datatype erroneously truncated the
fromhost register's value in the expression csr_swap(fromhost, 0),
because the type of the RHS is int, not long.
Implement draft of new calling convention

Here is the new syscall ABI:

  syscall number in a7
  args in a0 - a6
  return value in a0

Here is the integer register map:

  x0  -> x0
  x1  -> ra
  x2  -> sp
  x3  -> tp
  x4  -> gp
  x5  -> t0
  x6  -> t1
  x7  -> t2
  x8  -> s0
  x9  -> s1
  x10 -> a0
  x11 -> a1
  x12 -> a2
  x13 -> a3
  x14 -> a4
  x15 -> a5
  x16 -> a6
  x17 -> a7
  x18 -> s2
  x19 -> s3
  x20 -> s4
  x21 -> s5
  x22 -> s6
  x23 -> s7
  x24 -> s8
  x25 -> s9
  x26 -> s10
  x27 -> s11
  x28 -> t3
  x29 -> t4
  x30 -> t5
  x31 -> t6
Fix PAGE_OFFSET relocation during boot