implement "-c" option to allocate a number of CPU shares to a container

Implements `-c` option, as requested by #471. Docs updated. Tests updated. One test fails on my machine, but it also fails on master, so I'm submitting the PR anyway and I'll file a separate issue for the failing test (probably due to my exotic network setup).