Pass number of elements to beginWriteDictionary

If the (begin/end)WriteDictionary functions of the serializer
accept an integer argument, pass the number of elements in the
dictionary.
Merge pull request #823 from jpf91/serialize-num

Pass number of elements to beginWriteDictionary.

See D-Programming-Language/dub#416