Fix some dep errors with cross-compiled plugins

* Make sure plugins link to plugin dependencies, not target dependencies.
  Previously the --extern flag was being passed incorrectly but the dependency
  was being picked up by -L anyway.

* Fix a type and actually put the host dep directory into LD_LIBRARY_PATH, not
  the target directory. A test was added for this change.
auto merge of #282 : alexcrichton/cargo/fix-some-cross-compile-with-plugins, r=wycats

* Make sure plugins link to plugin dependencies, not target dependencies.
  Previously the --extern flag was being passed incorrectly but the dependency
  was being picked up by -L anyway.

* Fix a type and actually put the host dep directory into LD_LIBRARY_PATH, not
  the target directory. A test was added for this change.