Pinterest delivers earnings beat, will partner with Amazon as it opens third-party ad demand