Made GetComponent a template function

Converted GameObject GetComponent function into to a template function. Unfortunately this forces the function to be defined in the header. 
Please review this pull request before merging