Tests and documentation for NestedStack.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>