Make ltrim() modify the input string

Also, always check string length in both ltrim() and rtrim().

Reference: https://github.com/networkupstools/nut/issues/154
Add ltrim_m()/rtrim_m() functions to trim several chars at the same time

Also, make ltrim() / rtrim() wrappers around ltrim_m() / rtrim_m().
nutdrv_qx: move to ltrim_m()/rtrim_m() functions