Ipns name resolution

This branch is not yet complete, but before i move forward, the name resolution code (in namesys) needs some critiquing. There are also a decent number of bugfixes in this branch that i ran into while trying to get the code to a point where i could test ipns.
Should have `-r` recursive flag. 

```sh
# pin one object
ipfs pin <hash>

# pin one object and all objects it links to
ipfs pin -r <hash>

# Bonus: pin recursively to a certain depth (LP)
ipfs pin -r -d <num> <hash>
```

(shall henceforth mark things **LP** and **HP** for Low Priority and ~~Harry Potter~~ High Priority.)