Make fm_gtk_init() idempotent, and fm_finalize() wants even calls.

The commit adds idempotency on fm_gtk_init(), not just fm_init().
And fm_finalize() will actually free resources only after number of
calls equal to fm_init() was done before.
The same about fm_gtk_init() with fm_gtk_finalize().