Prevent propagation of shared_library's link_settings

The LinkDependencies function was used in two places:
1) determining targets whose link_settings should be merged into a
   linkable target (in DoDependentSettings)
2) determining targets that generate static libraries that need to be linked
   into a linkable target (in AdjustStaticLibraryDependencies)

For case 1), we should not include shared_library targets, because they are
fully linked.  For case 2), we should include shared_library targets because
they generate the import static library.

This patch adds two new functions to handle both these cases, and changes
LinkDependencies to be an internal implementation detail of these two new
functions.

A new test has been added that verifies link_settings are not propagated
outside the shared_library.

BUG=gyp:108
R=mark@chromium.org

Review URL: https://codereview.chromium.org/23451011

git-svn-id: http://gyp.googlecode.com/svn/trunk@1717 78cadc50-ecff-11dd-a971-7dbc132099af
ninja&make/mac: Fix .strings encoding regression from r1707.

Python's decode() function doesn't remove the BOM when decoding 'UTF-16LE' and
'UTF-16BE', so gyp-mac-tool ended up writing two BOMs: The correct BOM, and then
the BOM from the input file.  Fix, add test.

BUG=chromium:280718
R=mark@chromium.org, rsesek@chromium.org

Review URL: https://codereview.chromium.org/23688005

git-svn-id: http://gyp.googlecode.com/svn/trunk@1718 78cadc50-ecff-11dd-a971-7dbc132099af