kernel: Support reading ELF notes of unknown size
kernel: Save and restore kqueues