Allow setting limit on number of documents in capped collections

Related: #1478