SAN FRANCISCO (Reuters) - Apple Inc has spent nearly three years fighting its rivals in a global smartphone patent war. Now, setbacks in two key U.S. court cases are laying bare why a drawn-out battle could be bad news for the iPhone maker.