Restrict nodepool memory only when possible

* .../files/nodepool/scripts/restrict_memory.sh: We have different
bootloader versions/implementations on different providers and
platforms, and in some cases may even have no accessible bootloader
configuration at all we can modify. Make this script more adaptable
and make sure it does not cause image builds to fail when run in
those situations.

Change-Id: If47fcdb60142d38d604a8f49be7885e61df8f34b
Merge "Restrict nodepool memory only when possible"