Check for duplicate flags.

Check that the short and long flag of each option has not been
defined before adding it to the group. Returns an ErrDuplicatedFlag
in case of error.
Check for duplicate flags.

Moved check to a function and do it only once at the end of the scan.
Moved duplicated flag check to  function
Added tests for duplicated flag check.
Merge pull request #49 from laurent22/master

Check for duplicate flags.