bash: fix "getcwd: cannot access parent directories: Math result..."

In get_working_directory(), the getcwd call in the __ANDROID__
workaround case was obviously wrong, having sizeof(char *) as a length
argument instead of the length of the malloced string itself. Also, no
check for malloc failure was there.

With this fix, tested on maguro, using bash with the usual prompt
containing pwd references, as well as the pwd bash builtin itself,
no longer spew these annoying messages mentioned in the title.

Also made a small change to sh_invalidnum() to fix compile warnings.

Change-Id: I9546e07731a251f80e410935619ddcf0873694af
Update to upstream bash 4.2

This upgrades bash to from 4.1-rc to 4.2-release. See CWRU/changelog for
changes.

Change-Id: I926269c300cf44fa25964b5b375a148fcf11c4b7
Fix building with 4.3's bionic

Change-Id: Icbbcf959deb199e7e584642027ea0383f6450fdc
Merge remote-tracking branch 'cm/cm-10.2' into HEAD