Updated fire model

Made some changes to the fire model:
  - Restructured the code
  - Added some comments
  - Added global variables for some parameters
  - Removed commented code
  - Removed unused variables

I started messing with agentscript and decided to try and improve a bit the fire model code. The code is now more readable and easier to understand (at least in my opinion). I don't have a lot of experience with agentscript, so there may be some things that could be improved further. 

In my machine the old code ran at ~42 FPS, while the new version runs at ~52 FPS with @ember_decay_rate set at 1.