refactor sprite to have shape sprites

- tested with gist #9022245
- refactored PolySpirte to Sprite which can be an image sprite, text
  sprite, polygon sprite or circle sprite
- refactored class functions of Sprite so that it works for any type of
  sprite
#533