Refactor: liblrmd: new internal function to create executor API objects
lrmd_api_new() and lrmd_remote_api_new() become wrappers for the new function.
The only effect as of this commit is that we now assert on errors,
rather than crash when dereferencing a NULL pointer later.
This will allow us to have better failure messages later.