Move methods to a separate library.

Refs #4959
Make sure the name of the initial library (libicinga) is not hard-coded.

Refs #4959
Merge branch 'feature/methods-lib-4959' into next

Fixes #4959