Fix incorrect handling of name.

I.e. don't set the name of the type as the default name of the entity
when creating it.
Make it easier to find incorrect materials.
Use a more updated boost detection macro.

As found on https://github.com/tsuna/boost.m4 .
This should fix issues with correctly finding all required libraries.
Handle background loading ourselves.

Instead of relying on the OgreTerrainGroup class.
This is for two reasons. The first is that the base class doesn't export
all needed symbols, which makes the build fail on Windows. The other is
that we don't want to pause the main loop 50 milliseconds when shutting
down.
Fix ctor call.
Fix missing header.

std::max is in algorithm header.
Static link Caelum on all platforms by default.

You still can dynamically link by setting the macro in CXXFLAGS.
Fix unknown typedefs.
Move out singleton initialization.

This is the only way accepted by msvc.
Fix header convection.
Change binreloc to cpp file.
Fixed initialization order.
Add precompiled header.
Fix crash when logging in&out from avatar select.
Fix numeric range comparer.
Remove duplicate empty check.
Remove loop, which runs always once.

I'm not sure if this code is correct, but it should behave the same way.
Remove unneeded if statement.

Both branches are calling the same code.
Fix wrong expression.

Compare returns 0 if the value matches.
Unsigned numbers can't be smaller than 0.