Fix setting collision representations in examples.
Fix setting collision representations in UnitTests.
Merge branch 'fix/setCollision-fix-Examples-UnitTests' into 'master'

Fix setting collision representations in examples

+1: Harald Scheirich

Merged-on: https://www.assembla.com/code/OpenSurgSim/git/merge_requests/823203
Check against nullptr when encode a pointer.

1. Add assert in encode() function in FrameworkConvert.cpp and
   MathConvert.cpp

2. Add UnitTest for encoding an empty pointer.
Merge remote-tracking branch 'origin/master' into fix/math-shape-serialization-and-unittest