pnor_partition_table: Refactor to allow tests to specify patch location

The Table class was unhelpful for testing in a couple of ways:

1. It attempted to access files on the filesystem whilst parsing ToC
   entries
2. It incorrectly assumed the location of the files it was accessing

Both of these issues come down to handling of patch files and the
configuration of the 'actual' member of the partition struct.

Hoist the handling of the partition entry's data size out of the ToC
parser, and rework the Table constructor to only require a struct
mbox_context pointer.  We can then use the paths member of mbox_context
to find the patch location rather than hard-code the value generated by
the configure script.

This prompts a rework and rename of the wrapper functions in
mboxd_pnor_partition_table.{cpp,h} to better align with the new
behaviour of the Table constructor. Reworking the wrappers has knock-on
effects in the tests, but the changes are straight-forward.

Change-Id: I87e63daf0d28b93566f7e5cb565cbf0790428479
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/mboxd_pnor_partition_table.h b/mboxd_pnor_partition_table.h
index 06934b9..d13a2d2 100644
--- a/mboxd_pnor_partition_table.h
+++ b/mboxd_pnor_partition_table.h
@@ -37,16 +37,14 @@
 /** @brief Create a virtual PNOR partition table.
  *
  *  @param[in] context - mbox context pointer
- *  @param[in] path - location of the partition file
  *
- *  This API is same as above one but it reads the partition file from
- *  from the given location(path).
+ *  This API is same as above one but requires context->path is initialised
+ *  with all the necessary paths.
  *
  *  Returns 0 if the call succeeds, else a negative error code.
  */
 
-int vpnor_create_partition_table_from_path(struct mbox_context *context,
-                                           const char* path);
+int init_vpnor_from_paths(struct mbox_context *context);
 
 /** @brief Copy bootloader partition (alongwith TOC) to LPC memory
  *