db: set next when adding out of order syscalls
db: set next when adding out of order syscalls

When adding syscalls out of order the db was not setting the next
pointer.  Thus all syscall blocks with a higher number were leaking.

Example:
rc = seccomp_add_syscall(SCMP_ACT_ALLOW, 10, 0);
rc = seccomp_add_syscall(SCMP_ACT_ALLOW, 5, 0)

Would cause the syscall 10 to be lost since adding the syscall 5 would
not set the next point to the syscall 10.

Signed-off-by: Eric Paris <b0b36e3cd9ea4e5739ff430a3056fabf2fdb0376@redhat.com>
Signed-off-by: Paul Moore <88a1d58bf22a647dce58dd91f9595600dceabba9@redhat.com>

amluto/libseccomp,amluto/libseccomp,amluto/libseccomp,seccomp/libseccomp,seccomp/libseccomp,seccomp/libseccomp