Refactoring redefinition and invalid types
Refactoring redefinition and invalid types

* Refactor out check_is_already_defined and check_has_known_type
  this makes the code's intent clearer. And we're going to need
  it in just a bit

Signed-off-by: Essien Ita Essien <bd402154b008803b915ff3326ddb7528f7e13a6b@gmail.com>

saleyn/erlcfg