More API functions added.
Added TradeDayIndex to StockHistory to keep track of how many trading dates have passed since the earliest fetched date.
Test case for api.GetOwnedDetailsNowForUser.
Calculated GainLoss values.
Simplified api.ddl; added RecordCurrentHourlyPrice; added GetOwnedDetailsForUser.
Updated yql API; rewrote RecordCurrentHourlyPrice to fetch from DB else fetch from Yahoo.