Minor clean-up in core_gyp_generator.pro and gyp_run.pro

- Use QMAKE_RESOLVED_TARGET to find out the core lib target name
- Pass the NINJAFLAGS env var to ninja instead of passing the content
- Remove invalid dependency rule for the ninja target, which is only
  parsed because it looks like a qmake condition.

Change-Id: I09bba8f350308d3249369171d0a3d5824f184590
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>