SPM: Refine pool logics

The pool logic is needed by both SPM and partitions so that it needs
to be changed as shared sources. Refine pool logics before changing.

- Do not use 0 size array in structure definition. Also, remove the
  workaround structure member around this 0 size array definition.
- Need to provide pool instance while calling the free function. This
  saves recording one pool instance in the chunk data structure.

Change-Id: I4e83770a5a7b07d1d46aec85b04d98f40a6f922b
Signed-off-by: Ken Liu <Ken.Liu@arm.com>
4 files changed