seccomp: Refactor the filter callback and the API