Allow explicit declaration of target type.

Related to 2a38eb9, if you *do* have an object of the form foo.r
and want to disambiguate it from being a file you can write:

```
foo.r:
  command: whatever()
  type: object
```

This also provides an alternative way of specifying plot and knitr
targets - rather than saying `knitr: true`, `type: knitr` will achive
the same thing.
Fix logic around auto_figure_prefix, expand tests