Kill db.get_res_id_and_icon

Only used in one place and mostly duplicating code unnecessarily.
Use logManager properties introduced with upcoming FIFE release

Since this commit will not make it into our release 2013.1, there are no
excuses left for delaying this any further.
Rename thread_error to ThreadError

To conform with most other exceptions we handle.
Typo and whitespace
Conflate two imports
Fix outdated comment
One more BE -> AE conversion