Improved overwriting priority of variables/constants/parameters

- Fixes issue 7968, thanks to Moguri
  http://hercules.ws/board/tracker/issue-7968-trader-npc-not-working/
- Corrected sprite name for KO_KAGE to match latest kRO info (previouly
  KO_ZANZOU, conflicting with a Kagerou/Oboro skill identifier)
- Updated self-test script to include checks for constants and for setd
  and getd.
- Made possible thanks to Ind.

Signed-off-by: Haru <haru@dotalux.com>