fossil: import from plan 9

R=rsc
https://codereview.appspot.com/7988047
50 files changed