Derive from prog-mode instead of text-mode

The reason for this change is that sparql is closer to a
programming language then just pure text. It also makes
sparql-mode inherit the minor-modes set for prog-mode.
Add ? as a part of a word in the syntax-table

Making ? part of a word allows thing-at-point to select the
whole variable in sparql mode as they begin with ?. It also
allows
$ is also allowed for variable definition

according to the sparql grammar definition $ is also allowed
in place of ? for defining variables.