Added functions to find the top and bottom of a SolidObject, plus bugfixes

Collision detection failed if an object did not collide with itself.
There is always a roof, not always a ceiling, but it was the ceiling
which added a SolidObject. This may have to be re-examined if and when
there are buildings without outsides.
Merge branch 'integration' of https://github.com/tipam/pi3d into integration
Merge pull request #112 from rurwin/integration

health and safety issues relating to walking on roof