SONARJAVA-649 Bug in enclosing class computation for scala objects

By removing the last "$" and the last "$class" in the shortName of the class it is allowing inner trait and object to be traited by sonar java plugin. 

Since in Java, there is no way to have an class with no name and with just class as a class name we can safely remove this suffix values in this context.

Not sure however this is the right place to do that.