[RFC] Ensure well-defined alloc behaviour.

clang defect report [1] caught this potential bug in memory.c, line 112:

> Call to 'calloc' has an allocation size of 0 bytes

calloc(0,x) or (x,0) and malloc(0) may return a NULL or non-NULL pointer
[2] on some implementations. Set the size and/or count to at least one
before calling an alloc() function to avoid undefined behaviour.

[1] defect report:
http://ruiabreu.org/neovim-analysis/report-oLRUxF.html#Path4

[2] http://man.he.net/man3/calloc

I'm certain that no code using `xcalloc()` right now is broken. I experimentally found that gcc will zero-fill at least 24 bytes of space, even on `calloc(0,0)`, but I hope nothing actually relies on that behaviour.

```c
#include <stdlib.h>
#include <stdio.h>

int main() {
    char* p = calloc(0,0); // OOPS!

    if( p == NULL ) return 1;

    size_t i = 0;
    for( ; p[i] == 0; i++ )
        printf("char @ %zu = %i\n", (size_t)p + i, (int)p[i]);
    printf("char @ %zu = %i\n", (size_t)p, (int)p[i]);

    free(p);
    return 0;
}
```
Tested with:
```bash
$ gcc alloc.c
$ ./a.out | wc --lines
25
```

static analyser: #167 
@philix said:
> After studying all this, I realized how genius git's xmalloc() impl was [2]. We better stick to it. :-)

> [2] https://github.com/git/git/blob/master/wrapper.c#L45

It remains unclear to me why git's implementation relies on such behaviour. Git's source assumes gcc (https://github.com/git/git/search?q=gcc&type=Code) so it may only work because of how gcc handles `calloc(0,0)`. 

nvim compiles with the `-std=gnu99` flag, but cannot compile with `-std=c99`. Does nvim intend to be C99-compatible? If not then I should definitely drop this PR.

> The main idea for xmalloc is: do not return NULL as this is understood as OOM and xmalloc should handle OOM.

That makes sense. So `xmalloc` shouldn't return `NULL` just because the user asked to allocate zero space. 

> For the case where size == 0 I think it's OK (and better) to stick to default malloc behavior.

`calloc` (and presumably `malloc`) seems to allocate a minimum amount of space to ensure that the caller will have at least *some*  space, even if the standard discourages actually using it. I agree we should stick with the "default" behaviour, but by making it explicit. Perhaps by keeping the `malloc(1)` line, or even using a higher number.