[ELY-94] Replace tests against exact KeySpec types for isAssignableFrom ...

...checks
Note: didn't guard against null values (i.e. keySpecType != null && keySpecType.isAssignableFrom()) because the password factory indirectly checks for null values before calling getKeySpec() or convertibleTo()