edify extensions for OTA package installation, part 2

Adds more edify functions for OTAs:

  is_mounted getprop apply_patch apply_patch_check apply_patch_space
  write_raw_image write_firmware_image package_extract_file

This allows us to install radios, hboots, boot images, and install
incremental OTA packages.

Fixes a couple of dumb bugs in edify itself:

  - we were doubling the size of the function table each time it was
    *not* full, rather than each time it was full

  - "no such function" errors weren't visible to the parser, so they
    didn't prevent execution of the script.
diff --git a/edify/expr.c b/edify/expr.c
index 129fbd9..5470a2b 100644
--- a/edify/expr.c
+++ b/edify/expr.c
@@ -283,7 +283,7 @@
 NamedFunction* fn_table = NULL;
 
 void RegisterFunction(const char* name, Function fn) {
-  if (fn_entries <= fn_size) {
+  if (fn_entries >= fn_size) {
     fn_size = fn_size*2 + 1;
     fn_table = realloc(fn_table, fn_size * sizeof(NamedFunction));
   }