Add some Lua functions, changes to hair.

+ beam_getEndPos()
+ entity_setCurrentHealth()
+ entity_setMaxHealth()
+ beam_getEndPos()
+ entity_hasAnimation()

- Add 3 new parameters to entity_damage: shot, hitX, hitY
- entity_getAnimationLength() supports string as 2nd parameter now.
  This will lookup an animation's length via name.
  Passing an ANIMLAYER_* constant works as it used to.