Extract functions for checking if a file is gcda/gcno

Change-Id: I0466c257ce37dc6060b3486c404404ce06b14e58
Support for cross-profiling

When cross-profiling with GCOV the data files are stored in a different
directory than the source code.  When a user specifies a --gcov-prefix in the
call to gcovr it must create symbolic links in the correct place or GCOV will
not be able to parse the data [1].

 [1]: http://gcc.gnu.org/onlinedocs/gcc/Cross-profiling.html

Change-Id: Ie8f31c37ad83637ae9b4259d074c70dbc7c360ac