Fixed hover sometimes not resetting when mouse leaves widget.
Fixed text position not taking into account stylebox's content margins.
(cherry picked from commit f5830e0973)
A general speedup should be apparent, with even more peformance increase when compiling optimized.
WARNING: Tested and it seems to work, but if something breaks, please report.