Use Sharness as our shell test framework, version 3

This is a rework of pull-request #204 (Use Sharness as our shell test framework, version 2).
I only fixed jbenet's points 1 and 3. Thanks jbenet!