Avoid NPE.
Return all goals when asked.

The goal code is a little messy, because we can't rely on looking into
the knowledge map for them, as the knowledge will only keep one goal per
subject.
In order to fix this we instead look for the goals in either "goals" or
"trigger_goals".
Store knowledge of goal differently.

Goals are handled differently than other knowledge, so we need to store
it in a separate dict.
Return string if message is string.
Improve settings of goals.

When a goal is set, the supplied 'object' can also be a list of strings
(i.e. a list of goals). All existing goals for the supplied subject will
be deleted. This allows for much better editing capabilities.
Improve goal creation.

We'll make sure all new goals are valid before we remove the old ones.
Fixed issue with setting multiple goals.
Fix tests.