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.
This tool's interface will be pretty tricky to get right. Dumping some notes here.

`publish` should be a porcelain command that simplifies the common name-publishing process. I think publish should operate on a **versioned namespace**: it publishes human-readable names in a versioned directory. So, say we have:

- `/ipns/H(<pk>)` points to a `commit` object.
- `commit` object points to a `map` (tree/directory/namespace) of names.
- `map` points to the published refs.

```sh
ipfs publish <name> <ipfs ref (hash or path)> [-m <message>]
# does:
# 1. add the mapping `<name> <ref>` to current namespace state (modify object, add new obj to ipfs)
# 2. create a commit pointing to this new namespace state + to last commit (with -m message), add to ipfs.
# 3. publish the new name mapping `H(<pk>) -> commit`
```