First-principles studies of the atomic, elastic and vibrational properties of BaNbO3