Extract method from slang_clear()
Extract method from spell_load_lang()
Split if statement for better clarity
Reduce additional duplication

Extract function from spell_load_spell_file() to increase DRYness
Fix size calculation for snprintf

The previous refactoring failed to update the size calculation, and
introduced a classic "sizeof array vs. pointer" bug. This fixes it (in
an ugly way - this is about to change in upcoming commits).
Rewrite spell file loading

Separate file name string generation and load order logic