First-principles calculations of elastic and electronic properties of NbB2 under pressure