Move sp-pairs/tags to the front

These variables are used in somewhere above where they were
defined.
Declare optional dependencies
Fix implicit variable access in sp--get-substitute
Merge pull request #59 from tkf/compiler-warning

Fix compiler warnings