use of "boost::optional", ImplContainer behaves like bool, rewrite of getEntities, fix to bugs in "Dimension"

Where to use "boost::optional" should still be discussed and "getEntities" is currently written to manage non-continuous numberings which should not be necessary, thus also to be discussed.