[WIP] Fix some clang analysis warnings

For the time being I fixed only [two](http://neovim.org/doc/build-reports/clang/report-21342f.html#EndPath) [errors](http://neovim.org/doc/build-reports/clang/report-f0c777.html#EndPath) `Argument with 'nonnull' attribute passed null` in `open_line()` from `misc1.c`.
The problem is that `clang` don't know that `int get_leader_len()` can't return something less than 0.
Better solution could be the change of the return type to `size_t` or `uint32_t` but it would involve more changes and I can't decide which type would be the best. Though if it is desirable I would be glad to realise that change.

I plan to fix some more warnings in the future in this PR.
@splinterofchaos I think that original code will not do the right thing in the case of `count == 0`. @aktau thanks for pointing out my error! My intent was to check `count` for sure.