syscall_filter: Refactor 'compile_file' out of 'compile_filter'.

The new in-process crash dumping on Android could use functionality to
include policy files in other policy files. The use case would be to
add a short section of syscalls required for crash dumping to processes
already using syscall filtering.

The first step to do this is to extract the functionality that parses
an individual file to a separate function, so that it can be called
multiple times.

Implementation of the include directive will be done in a follow-up CL.

Bug: 36007996
Test: New unit tests, but no change in functionality.

Change-Id: I4097513bf11c23af67b6741fceb5c7abe360396e
diff --git a/bpf.c b/bpf.c
index b618866..8f5a08d 100644
--- a/bpf.c
+++ b/bpf.c
@@ -267,8 +267,9 @@
 	}
 	end = begin + labels->count;
 	for (id = 0; begin < end; ++begin, ++id) {
-		if (!strcmp(label, begin->label))
+		if (!strcmp(label, begin->label)) {
 			return id;
+		}
 	}
 
 	/* The label wasn't found. Insert it only if there's space. */
@@ -284,7 +285,6 @@
 	return id;
 }
 
-/* Free label strings. */
 void free_label_strings(struct bpf_labels *labels)
 {
 	if (labels->count == 0)