Bulk code formatting to comply with WPCS

Over time there were a lot of code formatting issues that were not compliant with [WP coding standards](http://make.wordpress.org/core/handbook/coding-standards/php/). This PR fixes those.

@shadyvb Please give this a look over and test generally throughout the plugin. Let me know if you encounter any issue.