changes to vibration.java to align with w3c, changes to vibration.js for backwards compatibility