libminijail: Refactor `seccomp_filter_flags_available()`

This change creates a new function called
`seccomp_filter_flags_available()` so that it can also be called from
tests.

Bug: None
Test: make tests

Change-Id: Ie41ef0c7c457a39e4a46d5fcb6d6ff1dd29de890
diff --git a/system.c b/system.c
index ae7f02c..52a07c5 100644
--- a/system.c
+++ b/system.c
@@ -22,6 +22,7 @@
 
 #include <linux/securebits.h>
 
+#include "syscall_wrapper.h"
 #include "util.h"
 
 /*
@@ -534,3 +535,9 @@
 
 	return ret_kill_process_available;
 }
+
+bool seccomp_filter_flags_available(unsigned int flags)
+{
+	return sys_seccomp(SECCOMP_SET_MODE_FILTER, flags, NULL) != -1 ||
+	       errno != EINVAL;
+}