Added labels to defences, moved some code

Added text-labels to defences that display hitpoints/max hitpoints. Eg:
"4/6"

Updated defence buttons to adapt to different heights depending on
placement type and defence type Z offset.

Shifted all time related utility functions to a separate file.