libfdt: Add functions for handling the "compatible" property

This patch adds functions for dealing with the compatible property.
fdt_node_check_compatible() can be used to determine whether a node is
compatible with a given string and fdt_node_offset_by_compatible()
locates nodes with a given compatible string.

Testcases for these functions are also included.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 6bc20ea..0c2142f 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -42,6 +42,8 @@
     run_test supernode_atdepth_offset $TREE
     run_test parent_offset $TREE
     run_test node_offset_by_prop_value $TREE
+    run_test node_check_compatible $TREE
+    run_test node_offset_by_compatible $TREE
     run_test notfound $TREE
 
     # Write-in-place tests