Bug 10159 - koha-rebuild-zebra error handling

This patch makes koha-rebuild-zebra:
- Check for the existence of the instance
- Handle arbitrary amount of instance parameters
- Capture -a and -b (which made the script rebuild twice the chosen DB). It adds the extended version (--authorities and --biblios respectively) of the option switch. This makes the -a and -b switches work as "only do authorities" (or viceversa). They can be used concurrently, which is the default behaviour when no switch is provided.
- Handle -v (and --verbose) as koha-rebuild-zebra options, to ease the use for non-techie users.
- The rebuild_zebra.pl is wrapped inside an IF to return error values if we ever make rebuild_zebra.pl return error codes (this is pointed in the code).
- Added -h/--help switches and an 'usage' output :-D Please provide patches for any wording issues, or contact me to fix it.

To test:
- Apply the patch and create your packages (or just use the script from your branch)
- Run it in this scenarios / options
  - -h/--help to see the available option switches
  - Mix them with one or more instances, of which some could be fake
  - try -a/--authorities and -b/--biblios in all possible combinations
  - try -v/--verbose works

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 10157 - koha-email-enable error handling

koha-email-enable now
- Checks the instance exists.
- Checks if email is already enabled.

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 10146 - koha-stop-zebra error handling

koha-stop-zebra now
- Checks the instance exists.
- Checks the instance is enabled.
- Checks if the zebra daemon is already running.

Regards
To+

Edit: Corrected the die message

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 10094 - koha-list should have a --disabled option switch

This patch adds that (--disabled) option switch, Also revisits some of the code and docs.

To test:
- Apply the patch and create new packages (you might just drop the koha-list command somewhere)
- Create several instances (koha-create)
- Randomly set some as disabled, others enabled and enable email on some.
- Test all possible option switches combinations

Expected results:
- koha-list should abort with a proper message if mutually exclusive options selected (--email vs. --noemail, --enabled vs. --disabled)
- koha-list should show the exact instances you asked for

Regards
To+

P.S.: I wanted to add the --disabled option switch for the tab-completion work I'm doing, but as of bug 4876 I thought it would be ok to revisit the script to make it robust and clear.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>

Does what it says, and cleans up the script at the same time.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'deb_scripts_312_rc1' into 3.14-master