Memory functions improvements: Make style homogeneous.

`try_malloc` was changed in 8bb2c2c0742c57150655e18cf8418a758cebdce8 to
avoid a warning when size is 0.

Code style was also improved on suggestion by @aktau.
This just applies the same style improvements to other similar
functions, to keep code homogeneous.
> I think reassigning argument values is something we want to avoid.

It's just that usually the names of the function arguments are just right, and thinking of other names or even using others can be confusing. The only hard things in computer science being caching and naming things... But I understand your arguments and I sympathise. It's ok for me.

> In fact, can't we make the parameters const? Or does that conflict with the contract of the standard calloc?

While we could do that, it would increase the size of function prototypes by a lot for not real gain for the caller. I personally don't like seeing it. Also for consistency then this should happen over the entire codebase, the policy being that arguments are never mutated.