gluster: Refactored gluster hook command tests

Refactored tests so that it can be reused by all
hook related commands.

Change-Id: I5fbcdd1858b5910b03dd8e710f4368b7b4d4ceb9
Signed-off-by: Sahina Bose <sabose@redhat.com>