[WFLY-2476] Security transformer improvements and better test coverage