ContextHubManager: Avoid bad NanoApp objects

We provide a preferred constructor for the user which will
always generate a serializable NanoApp object.  While we
still support the other path, we throw a specific exception
when trying to serialize a bad NanoApp object to ease
debugging.

Change-Id: I7ee610f0fce2f0dd489526e4819f66035281024b
2 files changed