Change extension on controller from .js to .ts

Note that the build fails, but it generates .js files.
Note that the generated .js matches the source .ts (because it's
straight javascript)
Add angular typing information

DefinitelyTyped project is a great resource for finding type information
for common JavaScript libraries.
If what you need isn't there, contribute.
Declare external variable of type any

This just makes the TypeScript compiler happy, but it's not quite right
yet.
Change contactsApp from 'any' to 'angular.IModule'

This gives us typing information about the contactsApp variable
Change type of $scope to ng.IScope

This is the base type for the runtime object, so it introduces compiler
errors.
Introduce IContactScope, derived from ng.IScope

use 'any' for some types not yet defined.
notice the type inference around toggleShowDetails.
define IContact

Place strong typing in the controller creation.