Ensure entity value is type str - SL #4621

As per SL #4621, there are times when the entity value passed in for
substitution is of type unicode. This causes Rsvg to fail when
processing the SVG. This patch checks for unicode and converts it to
utf-8.


As per the discussion on PRs 34 and 35, moving the encoding to the SVG loader.