Be a bit more careful when linking to index variable

@yger noted a problem when connecting a `Synapses` class to a NeuronGroup that contains linked variables. The problem is that we try to establish a linking to all pre/postsynaptic variables by default and doing this for a linked variable is non-trivial (see #276). This fix checks for some of those situations and makes the `Synapses` class not fail when it can't establish a link to a pre-/postsynaptic variable. Also adds some more tests.

I think we should merge this change rather sooner than later since the issue described above leads to annoying unnecessary errors when the user does not actually need the automatically linked variable in the synapse. We can still think of a better general approach.