theme and TcApi-hookup plugin fixes for broken code introduced in recent commits

Recent changes in codebase broke theme with undefined JS variables being used and a new constant declared in theme functions.php (TC_API_URL) which has same name as the one used in TcApi-hookup plugin, broke the plugin because of differences in URL (api.topcoder.com vs. api.topcoder.com/v2). This fixes these problems.