Remove use of file absolute paths.

An absolute path is derived from a relative path by
appending the value of "user.dir" to it. "user.dir" is
populated by the VM by calling getcwd(3). All apps
forked from zygote end up with a "user.dir" (and a current
working directory) value of "/".

This, along with change 417621196b855 (which prevents
"user.dir" from being changed by apps) will make file handling
a lot more consistent. In particular 417621196 ensures that

- The output of getAbsolutePath can never change for a given
  relative path.
- File.getPath() and File.getAbsolutePath() become interchangeable
  wrt. lower level (Libcore.os) APIs.

Change-Id: I5598a2b1c5de65b59d69324f98656ffe031290f0
Make system properties read only.

The issue is that some parts of the system libraries
(and the runtime) assume that these properties are
immutable. This change enforces that notion and makes
behaviour a lot more predictable.

This is not a backwards compatible change, but based
on analysis of code available to me I couldn't find any
instances where this change would break any application.

Has the side effect of fixing..

bug: 12491204
bug: 12491159

Change-Id: I60c73713c97a4721d0b9781010333a9e9c883534
Fix PropertiesTest.

A test case was using HashTable.get instead of
Properties.getProperty.

The problem is that Properties.propertyNames will
enumerate all properties from the object as well as
from the "default" Properties object it was constructed
with. The get method derived from HashTable isn't
aware of default properties though, so it will fail.

Using composition instead of inheritance would've
resulted in a cleaner design.

Change-Id: I58323767e6872ed1722167d2a4a6d89a98d26ec7
Merge "Fix PropertiesTest."
Fix Preferences related tests, document limitations.

- The default Preferences factory methods are entirely
  useless on android. "java.home" points to a location
  in a read-only partition and "user.home" is set to "/"
  which apps are not allowed to write to. A strong warning
  has been added against these methods.

- We continue to support the underlying default preferences
  implementation (even though there's no way to use the impl.
  directly except by reflection) to help apps transition *just
  in case* they were manually massing "user.home" and "java.home".

- Add a fake preferences factory that allows us to
  use a new (temporary) preferences root for every test.
  Fixed a test interdependency issue that was uncovered
  by this change.

Change-Id: I6019441c65b398376d84264f1e4c9776507533eb
Fix FileTest / OldFileTest.

- Remove legacy harmony gunk from setUp / tearDown

- Don't attempt to set "user.dir" (in most cases it
  was being set to "java.io.tmpdir" despite there being
  several better ways to exercise the behaviour under
  test)

Change-Id: I0e6446e5b2b02541cf484b268d5a691f98edaaa9
Fix another set of file related tests.

- Get rid of Support_PlatformFile, use File.createTempFile
  instead.
- Replace numerous uses of "user.dir" / "user.home" etc. with
  File.createTempFile
- Replace calls to Process / chmod with Libcore.os.chmod. The
  calls wouldn't have worked anyway, since chmod on android
  doesn't understand the incremental (+w, -x) syntax.

Change-Id: Ic6944568bbee6a548da6dcb4364b882636f2959f
Merge changes I60c73713,I5598a2b1

* changes:
  Make system properties read only.
  Remove use of file absolute paths.
Merge "Fix Preferences related tests, document limitations."
Merge "Fix FileTest / OldFileTest."
Merge "Fix another set of file related tests."
Merge branch 'master' of https://android.googlesource.com/platform/libcore into HEAD