fix signature generation

In canonical_string, query string must
be lexicographically sorted by query name.
This patch enables to work it correctly,
and adds a unit test for checking it.
Merge pull request #56 from bloodeagle40234/fix-signature

fix signature generation